Try it free

Transform OTLP gRPC to HTTP with the OTel Collector

  • Latest Dynatrace
  • How-to guide
  • 1-min read

The following configuration example shows how you would configure a Collector instance to transform a gRPC OTLP request to its HTTP counterpart.

Prerequisites

  • One of the following Collector distributions:
    • The Dynatrace OTel Collector
    • The Dynatrace Bindplane OTel Collector
    • OpenTelemetry Core or Contrib
    • A custom Builder version
  • The Dynatrace API endpoint URL to which the data should be exported
  • A platform token with the relevant scope (only required for SaaS and ActiveGate)

See Collector Deployment and Collector Configuration on how to set up your Collector with the configuration below.

Demo configuration

receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp_http:
endpoint: ${env:DT_ENDPOINT}
headers:
Authorization: "Bearer ${env:DT_PLATFORM_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [otlp_http]
metrics:
receivers: [otlp]
processors: []
exporters: [otlp_http]
logs:
receivers: [otlp]
processors: []
exporters: [otlp_http]

Assign the scope that matches your signal type: openpipeline:logs:ingest for logs, openpipeline:metrics:ingest for metrics, or openpipeline:traces:ingest for traces.

Configuration validation

Validate your settings to avoid any configuration issues.

Components

For our configuration, we configure the following components.

Receivers

Under receivers, we specify the gRPC otlp receiver as active receiver component for our Collector instance.

Exporters

Under exporters, we specify the default otlp_http exporter and configure it with our Dynatrace API URL and the required authentication token.

For this purpose, we set the following two environment variables and reference them in the configuration values for endpoint and Authorization.

  • DT_ENDPOINT contains the base URL of the Dynatrace API endpoint (for example, https://{your-environment-id}.live.dynatrace.com/api/v2/otlp).
  • DT_PLATFORM_TOKEN contains your platform token with the openpipeline:logs:ingest, openpipeline:metrics:ingest, and openpipeline:traces:ingest scopes.

Service pipelines

Under service, we eventually assemble our receiver and exporter objects into pipelines, which explicitly accept gRPC requests and forward them on HTTP to Dynatrace.

Limits and limitations

Data is ingested using the OpenTelemetry protocol (OTLP) via the Dynatrace OTLP APIs and is subject to the API's limits and restrictions. For more information see:

  • OpenTelemetry metrics limitations
  • Dynatrace metrics mapping
  • Ingest OpenTelemetry logs

Related topics

  • Enrich ingested data with Dynatrace-specific fields
  • Enrich OTLP requests with Kubernetes data
Related tags
Application Observability