I would like to use opentelemetry-java-instrumentation with AWS OTEL collector and X-Ray. Unfortunately, AWS OTEL aws-xray exporter is not able to export generated traces to X-Ray because generated trace ID is invalid X-Ray trace ID:
awsxrayexporter@v0.36.0/awsxray.go:65 Error translating span. {"kind": "exporter", "name": "awsxray", "error": "invalid xray traceid: 285a8d7e2694ae62bdb3dff2eed5ae41"}
How to instrument my opentelemetry-java-instrumentation 1.7.0 to generate trace IDs in X-Ray format?
I’ve tried to add aws extension + env variables:
OTEL_PROPAGATORS: xray,tracecontext,b3 OTEL_JAVAAGENT_EXTENSIONS: /path/opentelemetry-extension-aws-1.7.0.jar
without success.
Advertisement
Answer
Actually, AWS maintains own a redistribution of the OpenTelemetry Agent for Java, which is customized for AWS services (X-Ray included).