04 Aug 2023 10:03 AM - last edited on 15 Dec 2023 03:29 PM by Ana_Kuzmenchuk
I modified my OpenTelemetry Java agent to include additional span attributes that were not in the original. After installing OneAgent, I can see the traces in PurePaths but they don't have the additional span attributes I added.
Is there any way for OneAgent to pick up the additional span attributes?
Solved! Go to Solution.
04 Aug 2023 10:39 AM - edited 04 Aug 2023 10:41 AM
Hello @Aelodus,
I assume you configured OneAgent to automatically instrument the application and ingest the Java traces, right? Or are you actively exporting to the OneAgent (or ActiveGate) endpoint?
Also, how did you configure the attributes? Via manual instrumentation in the code or using a different approach?
Cheers,
Alexander
04 Aug 2023 12:46 PM - edited 04 Aug 2023 12:53 PM
Sorry for not being clearer, I configured OneAgent to automatically ingest Java traces from OpenTelemetry.
The attributes are created using OpenTelemetry Java extensions i.e. https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/examples/extension/RE...
04 Aug 2023 01:09 PM - edited 04 Aug 2023 01:11 PM
No worries, just wanted to clarify the details so that we are definitely on the same page.
I am currently clarifying if that scenario is supported and will get back as soon as I know more (could be only next week, however).
Just one other question, did you verify if the extension generally works and the attributes get added?
Cheers,
Alexander
04 Aug 2023 01:22 PM
Thanks for the prompt response.
Yes, I have tested my OpenTelemetry Java agent with the extension by exporting the traces to Zipkin, and everything works normally, with the attributes getting added.
04 Aug 2023 01:59 PM
From what I managed to gather so far, it may work, but a lot depends on how your extension adds the attributes. Not all ways may be supported by automatic ingestion, especially if the extension did not perform that straight on an OTLP level but added it on an exporter or tracer level.
Also, did you verify the attributes are whitelisted?