Skip to content

fix(OTel): Сatalogue event names don't match OTel's normalised form#206

Merged
khvn26 merged 1 commit into
mainfrom
fix/otel-event-name-in-catalogue
Apr 20, 2026
Merged

fix(OTel): Сatalogue event names don't match OTel's normalised form#206
khvn26 merged 1 commit into
mainfrom
fix/otel-event-name-in-catalogue

Conversation

@khvn26

@khvn26 khvn26 commented Apr 20, 2026

Copy link
Copy Markdown
Member

Contributes to #201.

The docgen events catalogue was rendering event bodies verbatim, but common.core.otel's structlog processor runs them through inflection.underscore before handing them to OTel. So logger.warning("no-analytics-database-configured") ended up as no_analytics_database_configured downstream, and stakeholders searching the catalogue for the name they saw in OTel couldn't find it.

Extracts the (logger_name, body) → event_name composition out of the structlog processor into a new get_otel_event_name helper 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.

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
@khvn26 khvn26 requested a review from a team as a code owner April 20, 2026 13:25
@khvn26 khvn26 requested review from gagantrivedi and removed request for a team April 20, 2026 13:25
@khvn26 khvn26 changed the title fix(OTel): catalogue event names now match OTel's normalised form fix(OTel): Сatalogue event names don't match OTel's normalised form Apr 20, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.26%. Comparing base (fce8370) to head (a957ff8).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khvn26 khvn26 merged commit 5c948bb into main Apr 20, 2026
4 checks passed
@emyller emyller deleted the fix/otel-event-name-in-catalogue branch April 20, 2026 13:51
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.

3 participants