Skip to content

Add EnableSemanticMetrics setting to emit "semantic" metrics#13

Merged
brandur merged 1 commit intomasterfrom
brandur-semantic-conventions
Apr 6, 2025
Merged

Add EnableSemanticMetrics setting to emit "semantic" metrics#13
brandur merged 1 commit intomasterfrom
brandur-semantic-conventions

Conversation

@brandur
Copy link
Contributor

@brandur brandur commented Apr 6, 2025

Here, address #7 to bring in a new option EnableSemanticMetrics that
causes the middleware to emit metrics compliant with OpenTelemetry's
"semantic conventions" [1]. These are a way to have all pub/sub systems
emit metrics with the same name and differentiated by attribute.

I've put this behind a configuration option because I'm not super
convinced that this is going to be an important feature for most people,
and under the assumption that metrics are cheap but not free, it
probably makes sense to emit only as many as necessary.

Fixes #7.

[1] https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/

Here, address #7 to bring in a new option `EnableSemanticMetrics` that
causes the middleware to emit metrics compliant with OpenTelemetry's
"semantic conventions" [1]. These are a way to have all pub/sub systems
emit metrics with the same name and differentiated by attribute.

I've put this behind a configuration option because I'm not super
convinced that this is going to be an important feature for most people,
and under the assumption that metrics are cheap but not free, it
probably makes sense to emit only as many as necessary.

Fixes #7.

[1] https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/
@brandur brandur requested a review from bgentry April 6, 2025 06:09
Copy link
Contributor

@bgentry bgentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :shipit:

@brandur brandur merged commit 9e50b6a into master Apr 6, 2025
2 checks passed
@brandur brandur deleted the brandur-semantic-conventions branch April 6, 2025 15:52
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.

Potential Metrics Renaming

2 participants