-
Notifications
You must be signed in to change notification settings - Fork 837
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
fix(instrumentation-grpc): always set grpc semcov status code attribute with numeric value #3076
Merged
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
4 tasks
The Lint fail in CI seems unrelated to this PR:
|
dyladan
approved these changes
Jul 5, 2022
blumamir
changed the title
fix(instrumentation-grpc): always set status code attribute with numeric value
fix(instrumentation-grpc): always set grpc semcov status code attribute with numeric value
Jul 5, 2022
legendecas
approved these changes
Jul 8, 2022
pichlermarc
approved these changes
Sep 8, 2022
Sorry for the delay, rebased and fixed the conflicts |
pichlermarc
approved these changes
Nov 30, 2022
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.
Which problem is this PR solving?
fixes #2984
fixes #3052
extends #2988 (which is not finalized: fixes an issue in one place out of 3 and no tests. no comment from the author for over a month).
Short description of the changes
This PR fixes various issues with grpc instrumentation in the status code attribute.
rpc.grpc.status_code
attribute was populated with string values which is not spec compliant. now it is filled with numbers fix(instrumentation-http): add http.host attribute before sending the request #3054SpanStatus
enum to populate the attribute, instead of the gRPC status codes, which was incorrect. Success status code for grpc (rpc.grpc.status_code) incorrect using grpc-js #2984rpc.grpc.status_code
was not populated in some cases. Now it is always filled where known.moduleExports
which made the code complicated and required to pass around the module exports just to read a constant value0
. This pattern is removed in favor of instrumentation constant. Read more discussion hereType of change
Please delete options that are not relevant.
How Has This Been Tested?
I added the relevant assert to unit tests. This revealed other places where the status code was not populated which I was not aware of and I also fixed them in this PR.
I am not deeply familiar with gRPC and this instrumentation, so please review it thoroughly :)
Checklist: