cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom OpenTelemetry span attributes in OneAgent

Aelodus
Newcomer

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?

5 REPLIES 5

alexander_dt
Dynatrace Helper
Dynatrace Helper

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

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...

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

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.

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?

https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry/faqs#expand--why-are-my-attrib...

Featured Posts