aws-otel-java-instrumentation icon indicating copy to clipboard operation
aws-otel-java-instrumentation copied to clipboard

Please make the otel to xray mapping functionality callable in different contexts

Open shorn opened this issue 11 months ago • 2 comments
trafficstars

I understand this repo is about the Java agent, not about direct Otel SDK implementation.

But since you have to do the otel->xray mapping anyway, it'd be great if folks could add this repo as a dependency and re-use your mapping code to call the PutTraceSegments API from a custom OTel exporter.

Yes, it would be better for people who don't want to run an agent or collector to call the new OTLP endpoint directly - but the OTel folks will not implement the AWS specific functionality needed to do that into their SDK.

I'm fine with writing a custom OTel exporter to call PutTraceSegments directly, but the OTel->XRay mapping is tricky and if your mapping code where reusable in that context- it'd be a good win.

shorn avatar Dec 22 '24 03:12 shorn

Hi @shorn . Thanks for making this feature request. Currently the otel -> xray mapping is present in the Collector to make it available across all the ADOT/OTel SDK implementations. But I understand your problem where you don't want to run the Collector and to rather export the spans to X-Ray directly from the SDK itself. Currently we don't have this feature on our roadmap, and there is a workaround that you may try in the meantime.

The PutTraceSegment API is capable of receiving protobuf encoded OTel spans as a payload. You can write a custom exporter similar to the OtlpUdpSpanExporter and instead of sending it over UDP, you can directly call the PutTraceSegments API.

srprash avatar Dec 30 '24 20:12 srprash

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

github-actions[bot] avatar Apr 06 '25 20:04 github-actions[bot]

This issue was closed because it has been marked as stale for 30 days with no activity.

github-actions[bot] avatar May 11 '25 20:05 github-actions[bot]