Skip to content

Conversation

@EvaBardou
Copy link
Collaborator

@EvaBardou EvaBardou commented Oct 17, 2022

Closes #1351

I tested the implementation with the following simultaneous calls to the logger:

logger.warning("A warning log for testing", extra_context="something meaningful...", more_context="XXXX")
logger.warning("A warning log for testing", extra_context="something else...", more_context="YYYY")
logger.error("An error log for testing", extra_context="something meaningful...", more_info="XXXX")
logger.error("An error log for testing", extra_context="something else...", more_info="YYYY")

Here is how the new setup renders messages in the console, Papertrail and Sentry:

Console

Capture d’écran du 2022-10-17 18-06-34

Papertrail - mocked through syslog (with extra contextual information)

Capture d’écran du 2022-10-17 18-06-17

Sentry (grouped Issues with contextualized Events)

As you can see on the screenshot, even with the extra context (stored in Additional data as before) the messages are still well grouped in Sentry, 1 issue associated with 2 events in the 2 cases.

Capture d’écran du 2022-10-17 18-17-35

@EvaBardou EvaBardou self-assigned this Oct 17, 2022
@abpostelnicu abpostelnicu merged commit 2debf02 into mozilla:master Oct 18, 2022
marco-c added a commit to marco-c/code-coverage that referenced this pull request Mar 9, 2023
marco-c added a commit to marco-c/code-coverage that referenced this pull request Mar 9, 2023
marco-c added a commit to mozilla/code-coverage that referenced this pull request Mar 9, 2023
* Use sentry_sdk instead of raven and improve Sentry grouping

Fixes #1521 by bringing in the changes from:
- mozilla/code-review#1253
- mozilla/code-review#1276
- mozilla/code-review#1333
- mozilla/code-review#1365

* Rename sentry_dsn parameter to SENTRY_DSN to match the name in code-review and reduce code differences between the log.py files
marco-c added a commit to mozilla/code-coverage that referenced this pull request Mar 9, 2023
* Use sentry_sdk instead of raven and improve Sentry grouping

Fixes #1521 by bringing in the changes from:
- mozilla/code-review#1253
- mozilla/code-review#1276
- mozilla/code-review#1333
- mozilla/code-review#1365

* Rename sentry_dsn parameter to SENTRY_DSN to match the name in code-review and reduce code differences between the log.py files
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.

Sentry grouping broken because of "extra" logging

2 participants