Add RPC semantic convention stability infrastructure#16112
Merged
trask merged 3 commits intoopen-telemetry:mainfrom Feb 6, 2026
Merged
Add RPC semantic convention stability infrastructure#16112trask merged 3 commits intoopen-telemetry:mainfrom
trask merged 3 commits intoopen-telemetry:mainfrom
Conversation
Add infrastructure for RPC stable semantic convention opt-in support: - Add emitOldRpcSemconv() and emitStableRpcSemconv() flags to SemconvStability - Add stableRpcSystemName() mapping function (apache_dubbo→dubbo, connect_rpc→connectrpc) - Add getOldRpcMethodAttributeKey() helper to avoid attribute key clashes in dual mode - Add getOldRpcMetricAttributes() helper to map deprecated key to stable key for metrics - Add 'rpc' and 'rpc/dup' to test task JVM args in build.gradle.kts The stability flags default to emitting old semconv only, ensuring no behavioral changes. This infrastructure enables future PRs to add stable RPC semantic convention support. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
trask
reviewed
Feb 6, 2026
Comment on lines
+184
to
+198
| public static AttributeKey<String> getOldRpcMethodAttributeKey() { | ||
| if (emitStableRpcSemconv()) { | ||
| // to avoid clash when both semconv are emitted | ||
| return RPC_METHOD_OLD; | ||
| } | ||
| return RPC_METHOD; | ||
| } | ||
|
|
||
| public static Attributes getOldRpcMetricAttributes(Attributes attributes) { | ||
| if (emitStableRpcSemconv()) { | ||
| // need to copy attributes | ||
| return attributes.toBuilder().put(RPC_METHOD, attributes.get(RPC_METHOD_OLD)).build(); | ||
| } | ||
| return attributes; | ||
| } |
Member
There was a problem hiding this comment.
why are these two methods needed? doesn't look like db semconv needed them?
Member
Author
There was a problem hiding this comment.
when we emit both semantic conventions we want to keep track of both method styles - so they can be added to the corresponding metrics. Spans will get new method in that case.
Member
There was a problem hiding this comment.
I'm still not following, let's just remove for now and you can add them back when you need them, then I can understand the context better and whether there's better option or not
trask
approved these changes
Feb 6, 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.
Towards #15932
Add infrastructure for RPC stable semantic convention opt-in support:
The stability flags default to emitting old semconv only, ensuring no behavioral changes. This infrastructure enables future PRs to add stable RPC semantic convention support.
#15871