-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend semantic convetions for RPC #900
Extend semantic convetions for RPC #900
Conversation
|
one more thing I'm wondering, should the leading slash be also trimmed for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more thing I'm wondering, should the leading slash be also trimmed for
RPCServiceKey
?
I think the leading slash should probably addressed, but probably at the "SetName" level. I think it should probably be preserved at this level.
It looks like we use the FullMethod
name when setting the name. This is introducing the leading slash. This is different than other language (Java IIRC does not have this). Probably worth tracking in an issue: #916
Span names MUST not contain the leading slash (`/`) that the grpc package prepends to all `FullMethod` values. This replaces the `serviceFromFullMethod` function with a parsing function. This parsing function returns an span name adhering to the OpenTelemetry semantic conventions as well as formatted span attributes. Additionally, the service name needs to include the package if one exists. This updates that attribute accordingly. Once #900 is merged the method attributes can be added by uncommenting. Resolves #916
Co-authored-by: Tyler Yahn <[email protected]>
* Update grpctrace instrumentation span names Span names MUST not contain the leading slash (`/`) that the grpc package prepends to all `FullMethod` values. This replaces the `serviceFromFullMethod` function with a parsing function. This parsing function returns an span name adhering to the OpenTelemetry semantic conventions as well as formatted span attributes. Additionally, the service name needs to include the package if one exists. This updates that attribute accordingly. Once #900 is merged the method attributes can be added by uncommenting. Resolves #916 * Update Changelog * Update comment to plural * Switch from regexp to string parsing * Consolidate attributes before creating span * Update Changelog with addition of rpc.method in grpctrace * Fix test spanMap lookup key * Update instrumentation/grpctrace/interceptor.go Co-authored-by: ET <[email protected]> * Unify on explicit typed return value * Fix copy paste error Co-authored-by: ET <[email protected]>
Enhance the existing semantic conventions for RPC, in line with open-telemetry/opentelemetry-specification#604, i.e.:
rpc.system
andrpc.method
rpc.service
to include the full service name, including package where applicableRelated Issues
Resolves #893