-
Notifications
You must be signed in to change notification settings - Fork 821
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
GRPC instrumentation. Added new attributes according to the OpenTelemetry rpc convention #3127
Merged
vmarchaud
merged 5 commits into
open-telemetry:main
from
andrewzenkov:fix-grpc-instrumentation-attributes
Jul 30, 2022
Merged
GRPC instrumentation. Added new attributes according to the OpenTelemetry rpc convention #3127
vmarchaud
merged 5 commits into
open-telemetry:main
from
andrewzenkov:fix-grpc-instrumentation-attributes
Jul 30, 2022
Conversation
This file contains 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
2 tasks
dyladan
added
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
spec-noncompliant
An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug
labels
Jul 29, 2022
Title isn't very specific as to what is actually happening. Please make a more descriptive title (and add it to changelog) |
Codecov Report
@@ Coverage Diff @@
## main #3127 +/- ##
==========================================
- Coverage 93.10% 93.09% -0.01%
==========================================
Files 195 196 +1
Lines 6384 6391 +7
Branches 1348 1348
==========================================
+ Hits 5944 5950 +6
- Misses 440 441 +1
|
andrewzenkov
changed the title
Grpc instrumentation attributes fix
GRPC instrumentation. Added new attributes according to the OpenTelemetry rpc convention
Jul 29, 2022
dyladan
reviewed
Jul 29, 2022
experimental/packages/opentelemetry-instrumentation-grpc/src/enums/AttributeNames.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-grpc/src/enums/AttributeValues.ts
Show resolved
Hide resolved
dyladan
approved these changes
Jul 29, 2022
vmarchaud
approved these changes
Jul 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
spec-noncompliant
An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug
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.
This PR is extending old one. Feel free to check it if needs comments
Which problem is this PR solving?
Opentelemtry grpc instrumentation is not consistent in terms of creating grpc attributes in requests.
For example in Java/Python instrumentations it contains necessary attributes for grpc connection:
But these attributes are missed in js grpc instrumentation. It doesn't set attributes.
Additionally, if compare Python/Java and Nodejs attributes.
Already existing attribute
rpc.method
is implemented incorrectly in Nodejs.opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/clientUtils.ts
Line 131 in 747c404
Fixes # (issue)
Short description of the changes
rpc.method
fromgrpc.method
torpc.method
attribute (Client, Server)rpc.service
attribute (Client, Server)rpc.system
attribute (Client, Server)rpc.method
value calculating for some use case. (it should be method, but value is just full path)Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Create GRPC example, run opentelemetry SDK using authoinstrumentation, or manually set
new GrpcInstrumentation()
, you will see that Grpc instrumentation detects grpc connection and creates spans but with missing attributes:And for client rpc.method has incorrect value.
opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/clientUtils.ts
Line 131 in 747c404
Before:
Client/server
After:
Client/Server