Skip to content

Conversation

@icehaunter
Copy link
Contributor

@icehaunter icehaunter commented Dec 17, 2024

Added a new configuration option 'tags_from_metadata' to both LoggerHandler that allows specifying which metadata fields should be included as tags in Sentry events.

Closes #827

@ruslandoga
Copy link
Contributor

ruslandoga commented Dec 17, 2024

Sorry for a drive-by comment, but what happens if metadata values are maps or lists? Wouldn't tags need to be scalar?

And I think it might make things clearer if tags option doc explains that it's completely independent of metadata option.

Copy link
Collaborator

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes but looking great.

Adds a new option `tags_from_metadata` that allows specifying sentry tags based on already-set Logger metadata keys.
@icehaunter icehaunter force-pushed the feature/add-tags-to-logger branch from e6c4330 to dd3537d Compare December 24, 2024 12:49
@icehaunter icehaunter changed the title feat: add tags option to LoggerHandler and LoggerBackend feat: add tags_from_metadata option to LoggerHandler Dec 24, 2024
Copy link
Collaborator

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! 🍬

@whatyouhide whatyouhide merged commit c565390 into getsentry:master Dec 25, 2024
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.

Add an ability to set tags from logger metadata

3 participants