fix(OTel): Сatalogue event names don't match OTel's normalised form#206
Merged
Conversation
Extracts the `logger_name`/`body` → OTel event name composition out
of the structlog processor into `get_otel_event_name`, the single
source of truth for what the OTel event name looks like. The docgen
events scanner now calls it too, so the catalogue matches what
stakeholders actually see downstream and any future tweak to the
name contract stays in sync by construction.
Behavioural change for the catalogue: event bodies are now
`inflection.underscore`-normalised, so `logger.warning("no-analytics-database-configured")`
renders as `no_analytics_database_configured` — matching OTel rather
than the raw source-code string.
beep boop
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
=======================================
Coverage 97.26% 97.26%
=======================================
Files 104 104
Lines 4457 4459 +2
=======================================
+ Hits 4335 4337 +2
Misses 122 122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
emyller
approved these changes
Apr 20, 2026
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.
Contributes to #201.
The docgen events catalogue was rendering event bodies verbatim, but
common.core.otel's structlog processor runs them throughinflection.underscorebefore handing them to OTel. Sologger.warning("no-analytics-database-configured")ended up asno_analytics_database_configureddownstream, and stakeholders searching the catalogue for the name they saw in OTel couldn't find it.Extracts the
(logger_name, body) → event_namecomposition out of the structlog processor into a newget_otel_event_namehelper and calls it from both places. The catalogue now shows the same names stakeholders see in OTel, and any future tweak to the name contract stays in sync by construction.