Enabling the capture of experimental span attributes (AWS_REQUEST_ID) #6129
Replies: 3 comments
-
moving this to the instrumentation repo |
Beta Was this translation helpful? Give feedback.
-
There are |
Beta Was this translation helpful? Give feedback.
-
Hi @laurit ! That's where I have some doubts. According the AWS support, you need to go through the response metadata to retrieve the Request-ID:
Looking at your code, you might want to do something like this to retrieve the Request-ID (or any other missing attributes)
https://www.tabnine.com/code/java/methods/com.amazonaws.ResponseMetadata/getRequestId |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I enabled the Enable the capture of experimental span attributes which, by looking at the code, should add attributes like AWS_REQUEST_ID (precisely what I need in my case): https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkExperimentalAttributesExtractor.java
I enabled it using by setting this to "true":
https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/aws-sdk
Everything is being exported as usual, but I don't see the extra attributes on the other side (we use honeycomb.io).
I enabled the LoggingSpanExporter to see what it tries to send exactly, confirming that no aws request-ID is being send:
[otel.javaagent 2022-05-30 17:18:48:214 -0400] [schedulerFactoryBean_Worker-1] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'S3.ListObjects' : 629534b701404ac57192802e332f6841 20811c9c3bc835a6 CLIENT [tracer: io.opentelemetry.aws-sdk-1.11:1.13.1-alpha] AttributesMap{data={thread.id=52, rpc.method=ListObjects, net.peer.name=coveo-ndev-binaries.s3.amazonaws.com, http.method=GET, aws.agent=java-aws-sdk, http.status_code=200, rpc.service=Amazon S3, aws.bucket.name=coveo-ndev-binaries, http.flavor=1.1, net.transport=ip_tcp, rpc.system=aws-api, thread.name=schedulerFactoryBean_Worker-1, http.url=https://coveo-ndev-binaries.s3.amazonaws.com, aws.endpoint=https://coveo-ndev-binaries.s3.amazonaws.com}, capacity=128, totalAddedValues=14}
Am I missing anything?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions