Skip to content

Conversation

@EvaBardou
Copy link
Collaborator

@EvaBardou EvaBardou commented Aug 16, 2022

Fix a bug that appeared after merging #1253, that raises an error Attempt to overwrite '*' in LogRecord (with *, a common attribute from LogRecord) when several logs were processed by structlog processors.

In logging documentation:

The keys in the dictionary passed in extra should not clash with the keys used by the logging system. (See the section on LogRecord attributes for more information on which keys are used by the logging system.)

The line raising the error in logging:
https://hg.python.org/cpython/file/3.5/Lib/logging/__init__.py#l1394

The quick fix implemented in this PR is to rename all clashing attributes by adding a _ character.

@EvaBardou EvaBardou requested a review from abpostelnicu August 16, 2022 12:15
@EvaBardou EvaBardou self-assigned this Aug 16, 2022
@abpostelnicu abpostelnicu merged commit 9ab85a3 into mozilla:master Aug 16, 2022
@abpostelnicu
Copy link
Contributor

Thank you! We might be able to do a release after this :)

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.

2 participants