• Home
  • Extend Dynatrace
  • Send data to Dynatrace with OpenTelemetry
  • OpenTelemetry metrics
  • Metrics ingest API

OpenTelemetry metrics ingest API

The OpenTelemetry metrics ingest API ingests OpenTelemetry metrics into 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 collector's YAML file, or directly in your application's code.

Where to find the code:

  • Collector: configure your exporter under the exporters section in the collector's YAML file. Use otlphttp to send metrics to Dynatrace.
  • Code: where to put your exporter configuration differs from language to language. Go to OpenTelemetry metrics and choose the language of your application from the menu to find the language-specific instructions.

The endpoint consumes a request with a application/x-protobuf payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/otlp/v1/metrics
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/otlp/v1/metrics
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/otlp/v1/metrics

Authentication

To execute this request, you need an access token with `metrics.ingest` (Ingest metrics) scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodystring[]

An ExportMetricServiceRequest message in binary protobuf format.

bodyrequired

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.

json
[ "string" ]

Response

Response codes

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

Related topics
  • OpenTelemetry metrics

    Learn how to extend observability in Dynatrace with OpenTelemetry metrics.

  • Extend metric observability

    Learn how to extend metric observability in Dynatrace.