OpenTelemetry trace ingest API
The OpenTelemetry trace ingest API ingests OpenTelemetry traces to Dynatrace. Use this endpoint as a target for OpenTelemetry exporters.
The exporter can send data to one or more backends and is configured either as part of a collector in the collectors YAML file, or as a standalone service in your application's code.
Where to find the code:
- Collector: configure your exporter under the exporters section in the collector YAML file. Generally, various data sources are supported. Use OTLP to send data to Dynatrace.
- Code: where to put your exporter configuration differs from language to language. Go to OpenTelemetry traces and choose the language of your application from the menu to find the language-specific instructions.
The request consumes an application/x-protobuf
payload.
POST | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/otlp/v1/traces |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/otlp/v1/traces | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v2/otlp/v1/traces |
Authentication
To execute this request, you need an access token with openTelemetryTrace.ingest
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | string[] | An ExportTraceServiceRequest message in binary protobuf format. | body | required |
Request body objects
The RequestBody
object
The object doesn't provide any parameters.
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
[
"string"
]
Response
Response codes
Code | Description |
---|---|
200 | The request has been received and will be processed. |
400 | The request could not be processed. This may happen if the message is malformed. |
500 | The request could not be processed due to an internal server error. |
503 | The service is currently unavailable. This may happen if the module is paused. |
Limitations
- The search of traces/spans by OpenTelemetry resources attribute is limited to the service.name. Use the Service name filter on the Distributed traces page.
- The search of traces/spans by OpenTelemetry span attribute is limited to the span name. Use the Request filter on the Distributed traces page.
OneAgent endpoint
In addition to the OpenTelemetry trace ingest API, OneAgent also provides a local-only OpenTelemetry endpoint for trace ingestion.
This endpoint address is http://localhost:14499/otlp/v1/traces
at the default TCP port 14499 (configurable via oneagentctl
) and requires a POST
request.
Enable the endpoint
The endpoint is disabled by default.
Comparison of ingestion API and OneAgent endpoint
Ingestion API | OneAgent endpoint |
---|---|
|
|