-
-
Notifications
You must be signed in to change notification settings - Fork 463
ref(logs): extract attribute compilation to dedicated method in LogsHandler #1931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
ref(logs): extract attribute compilation to dedicated method in LogsHandler #1931
Conversation
|
@cleptric I have recreated a PR and resolved the issue where merging caused data to be overwritten |
|
Hi @huangdijia! Could you look at the failing CI? Also, please do not introduce an additional namespace. This will change the shape of the data and it might break existing things. We also changed the value of |
|
Hi @huangdijia! Could you look at the failing CI?
We also changed the value of It has been handled |
…andler Extracts the attribute merging logic into a new compileAttributes() method for better organization and readability. The new method properly structures log attributes with namespaced keys (log.context, log.extra, log.channel) while maintaining the existing sentry.origin attribute.
…leAttributes method
921493a to
a20fe76
Compare
Updated the compileAttributes method to use array_merge instead of array spread syntax for compatibility and clarity when merging context, extra, and additional attributes.
Changed the 'sentry.origin' attribute from 'auto.logger.monolog' to 'auto.log.monolog' in the compileAttributes method for consistency or integration requirements.
Refactored the compileAttributes method to merge context and extra arrays directly, removing the use of Arr::simpleDot and the log.channel attribute.
Summary
compileAttributes()method for better code organizationlog.context,log.extra,log.channel)sentry.originattribute functionalityChanges
compileAttributes()protected method toLogsHandlerclassarray_merge()call with method call for better readabilityTest plan
sentry.originattribute is still set correctlyNote
Cursor Bugbot is generating a summary for commit 9dcb383. Configure here.
Link #1929