-
Notifications
You must be signed in to change notification settings - Fork 874
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
Implement gRPC request metadata #6991
Labels
enhancement
New feature or request
Comments
I would love to be assigned to this aswell |
Tavh
changed the title
Implement gRPC request and response metadata
Implement gRPC request metadata
Oct 30, 2022
Update: During development I realized that gRPC response is not yet implemented in this instrumentation library. |
PR for this issue: |
trask
added a commit
that referenced
this issue
Jan 18, 2023
Solves. #6991 This PR implements the request portion of the new gRPC metadata instrumentation spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md#grpc-request-and-response-metadata The changes include: - new CommonConfig entry for desired gRPC metadata values: 'otel.instrumentation.grpc.capture-metadata.request' (Similar to http headers) - setting the desired metadata values in GrpcTelemetry - new property in GrpcAttributesExtractor that holds a reference to the GrpcRpcAttributesGetter - new property in GrpcAttributesExtractor that stores the desired values so it can iterate them and extract each one from the request - inject the GrpcRpcAttributesGetter to GrpcAttributesExtractor (in GrpcTelemetryBuilder) - logic in GrpcRpcAttributesGetter to safely extract the gRPC metadata value - A new test in GrpcTest that makes sure that when a certain metadata key name is inserted, it also ends up in the span attributes ** Doesn't take care of the response because gRPC response is not implemented in java-instrumentation yet. (This is absolutely necessary but out of scope for this PR) ** "metadataValue" is only implemented inside GrpcRpcAttributesGetter and not in RpcAttributesGetter to avoid providing implementations for every RpcAttributesGetter in the repo as this PR only focuses on gRPC. Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As specified in the OTel specification:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md#grpc-request-and-response-metadata
The text was updated successfully, but these errors were encountered: