Skip to content

Conversation

huangdijia
Copy link

@huangdijia huangdijia commented Sep 30, 2025

Summary

  • Extracts attribute merging logic into a new compileAttributes() method for better code organization
  • Properly structures log attributes with namespaced keys (log.context, log.extra, log.channel)
  • Maintains existing sentry.origin attribute functionality

Changes

  • Added compileAttributes() protected method to LogsHandler class
  • Replaced inline array_merge() call with method call for better readability
  • Improved attribute organization with proper namespacing

Test plan

  • Verify existing Monolog integration tests pass
  • Confirm log attributes are properly structured in Sentry
  • Ensure sentry.origin attribute is still set correctly

Note

Cursor Bugbot is generating a summary for commit 9dcb383. Configure here.

Link #1929

…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.
@huangdijia
Copy link
Author

@cleptric I have recreated a PR and resolved the issue where merging caused data to be overwritten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant