For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/opentelemetry/setup/otlp_ingest/metrics.md. A documentation index is available at /llms.txt.

Overview

Datadog’s OpenTelemetry Protocol (OTLP) metrics intake API endpoint allows applications, managed platforms, and OpenTelemetry Collectors to send metrics to Datadog over OTLP HTTP.

Use the direct configuration on this page when you need to send metrics without the Datadog Agent or an OpenTelemetry Collector. For production Collector deployments, use Set Up the OpenTelemetry Collector.

This endpoint is particularly useful in the following scenarios:

  • OpenTelemetry distributions that use OTLP exporters: Some OpenTelemetry distributions, such as the AWS Distro for OpenTelemetry (ADOT), use a unified OTLP exporter. The OTLP metrics endpoint enables these distributions to send metrics to Datadog.

  • Technical constraints using an Agent or Collector: Direct ingestion supports third-party managed services, applications on customer devices, and other environments where running additional software is impractical.

If you are sending metrics from a managed platform (Cloudflare, Vercel, Heroku, and others), see Managed platforms for the correct endpoint configuration.

Configuration

To export OTLP metrics data to the Datadog OTLP metrics intake endpoint:

  1. Ensure only delta metrics are sent.
  2. Configure the OTLP HTTP exporter.
    • Set the Datadog OTLP metrics intake endpoint.
    • Configure the required HTTP headers.
  3. (Optional) Set the dd-otel-metric-config HTTP header to configure the metric translator behavior.
As of September 1, 2026, the OTLP metrics intake endpoint stores explicit bucket and exponential histograms natively, keeping their original buckets. Datadog computes percentiles from those buckets. The Metrics Catalog and Metrics Explorer show each histogram's type: Explicit Histogram or Exponential Histogram. Distribution queries on your histogram metrics work without changes. The endpoint ignores the histograms and summaries fields in the dd-otel-metric-config header.

Configure the exporter

To send OTLP data to the Datadog OTLP metrics intake endpoint, use the OTLP HTTP exporter. For metrics, the exporter supports both HTTP Protobuf and HTTP JSON. HTTP Protobuf is recommended for better performance.

The process differs depending on whether you’re using automatic or manual instrumentation for OpenTelemetry.

Based on your Datadog site, which is : Replace your endpoint with in the following examples.

Ensure only delta metrics are sent

The Datadog OTLP metrics intake endpoint accepts only delta metrics. If you attempt to send cumulative metrics (the default in most SDKs), you will receive an error. Make sure to configure your OpenTelemetry SDK or Collector to produce delta metrics.

Automatic instrumentation

If you are using OpenTelemetry automatic instrumentation, set the following environment variables:

export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=""
export OTEL_EXPORTER_OTLP_METRICS_HEADERS="dd-api-key=${DD_API_KEY}"
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE="delta"

Manual instrumentation

If you are using manual instrumentation with OpenTelemetry SDKs, configure the OTLP HTTP Protobuf exporter programmatically.

The JavaScript exporter is @opentelemetry/exporter-metrics-otlp-proto. To configure the exporter, use the following code snippet:

const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-proto');

const exporter = new OTLPMetricExporter({
  url: 'https://otlp.datadoghq.com/v1/metrics',
  temporalityPreference: AggregationTemporalityPreference.DELTA, // Ensure delta temporality
  headers: {
    'dd-api-key': process.env.DD_API_KEY,
    'dd-otel-metric-config': '{"resource_attributes_as_tags": true}',
  },
});

The Java exporter is OtlpHttpMetricExporter. To configure the exporter, use the following code snippet:

import io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporter;

OtlpHttpMetricExporter exporter = OtlpHttpMetricExporter.builder()
    .setEndpoint("https://otlp.datadoghq.com/v1/metrics")
    .setAggregationTemporalitySelector(
      AggregationTemporalitySelector.deltaPreferred()) // Ensure delta temporality
    .addHeader("dd-api-key", System.getenv("DD_API_KEY"))
    .addHeader("dd-otel-metric-config", "{\"resource_attributes_as_tags\": true}")
    .build();

The Go exporter is otlpmetrichttp. To configure the exporter, use the following code snippet:

import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"

metricExporter, err := otlpmetrichttp.New(
  ctx,
  otlpmetrichttp.WithEndpoint("otlp.datadoghq.com"),
  otlpmetrichttp.WithURLPath("/v1/metrics"),
      otlpmetrichttp.WithTemporalitySelector(deltaSelector), // Ensure delta temporality
  otlpmetrichttp.WithHeaders(
    map[string]string{
      "dd-api-key": os.Getenv("DD_API_KEY"),
      "dd-otel-metric-config": "{\"resource_attributes_as_tags\": true}",
    }),
)

The Python exporter is OTLPMetricExporter. To configure the exporter, use the following code snippet:

from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter

exporter = OTLPMetricExporter(
    endpoint="https://otlp.datadoghq.com/v1/metrics",
    preferred_temporality=deltaTemporality, # Ensure delta temporality
    headers={
        "dd-api-key": os.environ.get("DD_API_KEY"),
        "dd-otel-metric-config": '{"resource_attributes_as_tags": true}',
    },
)

(Optional) Configure the metric translator

Use the dd-otel-metric-config header to configure how metrics are translated and sent to Datadog. The JSON header contains the following fields:

resource_attributes_as_tags
Type: Boolean
Default: false
If set to true, transforms all resource attributes into metric labels, which are then converted into tags.
instrumentation_scope_metadata_as_tags
Type: Boolean
Default: false
If set to true, adds the name and version of the instrumentation scope that created a metric to the metric tags.
histograms.mode
Type: String
Deprecated: Ignored as of September 1, 2026. Datadog stores histograms natively regardless of this setting.
Mode for exporting histograms. Valid values are:
  • distributions: sends histograms as Datadog distributions.
  • counters: sends histograms as Datadog counts, one metric per bucket.
  • nobuckets: sends no bucket histogram metrics.
histograms.send_aggregation_metrics
Type: Boolean
Deprecated: Ignored as of September 1, 2026. Datadog doesn’t write separate .sum, .count, .min, and .max metrics. Query the histogram metric with the matching aggregation instead, such as count:<METRIC_NAME>{*}.as_count().
If set to true, writes additional .sum, .count, .min, and .max metrics for histograms.
summaries.mode
Type: String
Deprecated: Ignored as of September 1, 2026.
Mode for exporting OTLP summaries. Valid values are:
  • noquantiles: sends no .quantile metrics. .sum and .count metrics are still sent.
  • gauges: sends .quantile metrics as gauges tagged by the quantile.

For example:

{
  "resource_attributes_as_tags": true,
  "instrumentation_scope_metadata_as_tags": true
}

OpenTelemetry Collector

If your OpenTelemetry Collector distribution does not include all the components used by Datadog’s recommended Collector setup, configure the OTLP HTTP exporter in your own distribution:

These examples use component identifiers from OpenTelemetry Collector Contrib v0.154.0. For other versions or distributions, use the identifiers that distribution supports.

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318

processors:
  cumulativetodelta: {}

exporters:
  otlp_http:
    metrics_endpoint: 
    headers:
      dd-api-key: ${env:DD_API_KEY}
      dd-otel-metric-config: '{"resource_attributes_as_tags": true}'

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [cumulativetodelta]
      exporters: [otlp_http]

This example converts cumulative metrics to the delta temporality required by the intake endpoint. Add any receivers and processors required by your Collector distribution.

For a production deployment using OpenTelemetry Collector Contrib, use the recommended OpenTelemetry Collector setup. It also configures sending-queue batching, resource detection, metric tagging, and host metadata enrichment.

Troubleshooting

Error: 403 Forbidden

If you receive a 403 Forbidden error when sending metrics to the Datadog OTLP metrics intake endpoint, it indicates one of the following issues:

  • The endpoint URL is incorrect for your organization.
    Solution: Use the correct endpoint URL for your organization. Your site is , so you need to use the endpoint.

Error: 413 Request Entity Too Large

If you receive a 413 Request Entity Too Large error when sending metrics to the Datadog OTLP metrics intake endpoint, it indicates that the payload size sent by the OTLP exporter exceeds the Datadog metrics intake endpoint’s limit of 512 KiB (compressed).

This error usually occurs when the OpenTelemetry SDK batches too much telemetry data in a single request payload.

Solution: Reduce the export batch size of the SDK’s batch processor. For example, in the OpenTelemetry Java SDK, you can adjust BatchMetricExportProcessor.

Issue: Missing datapoints or lower than expected metric values

If you notice missing datapoints or lower than expected metric values, it may be because you are sending multiple datapoints for a metric that have the same timestamp (in seconds) and same dimensions. In such cases, Datadog only accepts the last datapoint, and previous datapoints are dropped (last-write-wins). Datadog requires the timeseries data of a metric to be unique in the context of {timestamp + dimensions}.

Solution: Ensure that your datapoints of a given metric at one timestamp are uniquely tagged. For example, if you send multiple datapoints for a metric simultaneously from multiple AWS Lambda invocations, make sure to include unique identifiers (such as the Lambda ARN) as resource attributes in your metrics. Use the resource_attributes_as_tags option to add these resource attributes as metric tags.

Further reading