aws-otel-java-instrumentation
aws-otel-java-instrumentation copied to clipboard
AWS SDK request id is using `aws.requestId` instead of `aws.request_id` defined by semantic conventions
This should be issue in upstream https://github.com/open-telemetry/opentelemetry-java-instrumentation but there are too many issues in upstream so creating one here first so people are aware of it.
In semantic convention registry, the attribute name for request id is aws.request_id schema, while the SDK generated spans are using aws.requestId from Application Signals Sample App
{
"aws.local.service": "vets-service-java",
"EC2.AutoScalingGroup": "eks-ng-171f7929-8cc8d89a-078d-578b-2510-f05a45ce860e",
"net.peer.port": 443,
"rpc.service": "S3",
"http.url": "https://s3.amazonaws.com/",
"Host": "ip-192-168-13-119.ec2.internal",
"rpc.system": "aws-api",
"thread.name": "http-nio-8083-exec-6",
"aws.remote.service": "AWS::S3",
"aws.remote.operation": "ListBuckets",
"aws.local.environment": "eks:midlina-otel/default",
"K8s.Namespace": "default",
"aws.local.operation": "GET /vets",
"http.status_code": 200,
"net.peer.name": "s3.amazonaws.com",
"aws.span.kind": "CLIENT",
"rpc.method": "ListBuckets",
"aws.agent": "java-aws-sdk",
"EC2.InstanceId": "i-0c649a0824e24ede9",
"EKS.Cluster": "midlina-otel",
"PlatformType": "AWS::EKS",
"aws.requestId": "Z4GPNP2V7J4VSQXP", // requestId
"http.method": "GET",
"thread.id": 48
}
Both v1 and v2 SDK in upstream repo are using aws.requestId
- V1 defined the attribute name in AwsExperimentalAttributes and used in AwsSdlExperimentalAtributesExtractor
- V2 hard code the attribute name and used in TracingExecutionInterceptor