jenkinsci / opentelemetry-plugin

Monitor and observe Jenkins with OpenTelemetry.
https://plugins.jenkins.io/opentelemetry/
Apache License 2.0
93 stars 47 forks source link

Generate AWS X-ray compatible trace IDs #853

Closed hhtpcd closed 2 weeks ago

hhtpcd commented 3 weeks ago

What feature do you want to see added?

It would be very useful when using AWS X-Ray to have the plugin be able to generate X-Ray compatible trace IDs. The awsxrayexporter chokes when it encounters non-xray ids. I'm not aware of other ways to convert or process non-xray IDs in flight at the otel-collector.

`2024-05-24T10:14:53.225Z   debug   awsxrayexporter@v0.78.0/awsxray.go:114  Error translating span. {"kind": "exporter", "data_type": "traces", "name": "awsxray", "error": "invalid xray traceid: b47fb1759d3adef02fac9043e6d0354b"}`

I appreciate that vendor specific support might not be desirable but AWS might be a large enough of a use case to be considered, I'm not aware of other vendors using their own ID formats.

Upstream changes

The AWS distribution for the Java agent patches in support for generating X-ray IDs, I wonder if this could be a toggle based on a configuration option in the Jenkins plugin.

Are you interested in contributing this feature?

No response

hhtpcd commented 2 weeks ago

I think I've found the answer, X-Ray started supporting W3C trace IDs ~8 months ago so no need to generate X-Ray format at the source. ADOT Collector >= v0.34 is required.

cyrille-leclerc commented 2 weeks ago

Thanks @hhtpcd . Can we then close this issue?

hhtpcd commented 2 weeks ago

Sure can - I've tested the plugin with the ADOT Collector and it works like a charm. Thanks for the plugin! ❤️