13 Jan 2026 10:05 PM
We have an application instrumented with Dynatrace OneAgent looking to extend data capture. They have added OTEL and are forwarding several custom metrics. How is the OTEL configured that would enable the metrics to be related to the proper entity? They would like to associate with the discovered service entity.
Solved! Go to Solution.
14 Jan 2026 08:19 AM
This is accomplished by adding the entity attributes in the OTEL resource metadata. For example, setting the dt.entity.process_group_instance attribute with the PGI value or dt.entity.host with the Host ID.
Look at the https://docs.dynatrace.com/docs/shortlink/otel-walkthroughs examples how to do that in different languages. Typically, the value is obtained from virtual files.
However, there are cases when either the code cannot be changed or OneAgent cannot be injected for several reasons. Then, if you know the value (entity ids are static), you can add the values using OTEL_RESOURCE_ATTRIBUTES (if your app supports it) or in the pipeline using OpenTelemetry collector.
Featured Posts