Skip to content

Rename instrumentation module names from kebab-case to snake_case#16442

Closed
zeitlinger wants to merge 2 commits intoopen-telemetry:mainfrom
zeitlinger:module-names-snake-case
Closed

Rename instrumentation module names from kebab-case to snake_case#16442
zeitlinger wants to merge 2 commits intoopen-telemetry:mainfrom
zeitlinger:module-names-snake-case

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

  • Replace hyphens with underscores in all InstrumentationModule constructor super() string literals (298 files)
  • Module names like akka-http become akka_http, making them valid YAML keys without quoting in declarative configuration

Fixes #15745.

Test plan

  • CI passes (no test changes needed — the AgentDistributionConfig.isInstrumentationEnabled() already normalizes hyphens to underscores via name.replace('-', '_') on line 128)
  • Verify declarative config YAML works with underscore names

@zeitlinger zeitlinger requested a review from a team as a code owner March 11, 2026 15:18
Fixes open-telemetry#15745. Instrumentation names now use underscores instead of hyphens,
which looks more natural in YAML declarative configuration files.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the module-names-snake-case branch from 9d45dd6 to 6476d85 Compare March 11, 2026 15:20
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@laurit
Copy link
Copy Markdown
Contributor

laurit commented Mar 12, 2026

CI passes (no test changes needed — the AgentDistributionConfig.isInstrumentationEnabled() already normalizes hyphens to underscores via name.replace('-', '_') on line 128)

Since we don't test with declarative config this won't help.
I'd suggest you to try out enabling/disabling instrumentations with environment variables. It should be possible to make it fail after these changes.

@zeitlinger zeitlinger marked this pull request as draft March 13, 2026 16:53
@zeitlinger
Copy link
Copy Markdown
Member Author

Closing for now - need to discuss if this is worth it

@zeitlinger zeitlinger closed this Mar 20, 2026
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.

Consider changing "instrumentation name" from - to _

2 participants