Skip to content

feat(opentelemetry_grpc): emit the stable RPC conventions behind OTEL_SEMCONV_STABILITY_OPT_IN - #894

Draft
yordis wants to merge 19 commits into
open-telemetry:mainfrom
yordis:yordis/feat-grpc-stable-rpc-semconv
Draft

yordis wants to merge 19 commits into
open-telemetry:mainfrom
yordis:yordis/feat-grpc-stable-rpc-semconv

Conversation

@yordis

@yordis yordis commented Nov 17, 2026

Copy link
Copy Markdown
Member

Builds on #893, only the last two commits are new here.

The RPC semantic conventions went stable, renaming rpc.system to rpc.system.name, replacing the integer rpc.grpc.status_code with the string rpc.status_code, making rpc.method fully qualified and dropping rpc.service and network.transport. The migration guide asks existing instrumentations to keep emitting the old attributes by default and to switch on OTEL_SEMCONV_STABILITY_OPT_IN, with rpc for the stable attributes and rpc/dup for both, so users can move their dashboards and alerts before the old names go away.

Both conventions name the method rpc.method, so in rpc/dup mode it carries the stable, fully qualified value.

The opt-in tests were committed failing before the implementation.

…ption event

A handler that crashes fails the server span, yet the span carries no
exception event, so the type, message and stacktrace never reach the trace.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…dler crashes

record_exception received the exception kind where it expects the exception,
so its guard rejected every call and no exception event was ever recorded.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…FOUND

A raised NOT_FOUND is how a handler returns that status, not a failure, and
the semantic conventions only record exceptions for failed operations.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
… fail the server span

Recording the event for every raised GRPC.RPCError would attach exceptions to
NOT_FOUND and the other client-side codes, which the span no longer treats as
failures.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…RNAL

A raised server-error code is a failed operation, so it keeps its exception
event while client-side codes drop theirs.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…l raises

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…n so it is not dropped

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…erver handler replies with

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…with when a server handler crashes

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…led calls

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…ilures group by what the caller saw

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…tion message

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…ion message, as the conventions ask

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/feat-grpc-stable-rpc-semconv branch from 2047f39 to 5f3bcb9 Compare November 23, 2026 11:31
…e semantic conventions package

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…urns a non-RPCError error

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…non-RPCError error, as the conventions require on failure

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…mantic conventions that define them

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…EMCONV_STABILITY_OPT_IN asks for them

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…EMCONV_STABILITY_OPT_IN asks for them

The RPC conventions went stable, and the migration guide asks instrumentations to let users opt in to them (or to both, while dashboards move) without breaking anyone who has not.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/feat-grpc-stable-rpc-semconv branch from 5f3bcb9 to 0890014 Compare November 25, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant