ref(logs): extract attribute compilation to dedicated method in LogsHandler#1931
Merged
Litarnus merged 7 commits intogetsentry:masterfrom Nov 5, 2025
Merged
Conversation
Contributor
Author
|
@cleptric I have recreated a PR and resolved the issue where merging caused data to be overwritten |
Contributor
|
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 |
Contributor
Author
|
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.
huangdijia
commented
Nov 3, 2025
Litarnus
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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