Skip to main content
This guide explains how to set up Datadog to ingest OpenTelemetry traces via the OpenTelemetry Collector (OTel Collector) using Docker. It follows the reference documentation from Datadog. While this tutorial demonstrates using an OpenTelemetry Collector running in Docker, the core concepts remain consistent regardless of how and where the OpenTelemetry collector is deployed.

Prerequisites

Instructions

Step 1. Configure the OpenTelemetry Collector

Create a new YAML configuration file named otel-collector.yml with the following content:

Step 2. Configure a test API

If you don’t have any APIs configured yet, create a subdirectory called apps in the current directory. Create a new file apidef-hello-world.json and copy this very simple API definition for testing purposes:

Step 3. Create the Docker-Compose file

Save the following YAML configuration to a file named docker-compose.yml.
To start the services, go to the directory that contains the docker-compose.yml file and run the following command:

Step 4. Explore OpenTelemetry traces in Datadog

  1. Send a few requests to the API endpoint configured in step 2: http://localhost:8080/hello-world/
  2. Log in to Datadog and navigate to the APM / Traces section. Here, you should start observing traces generated by Tyk:
Tyk API Gateway distributed trace in Datadog
  1. Click on a trace to view all its internal spans:
Tyk API Gateway spans in Datadog
  1. Datadog will generate a service entry to monitor Tyk Gateway and will automatically compute valuable metrics using the ingested traces.4
Tyk API Gateway service monitoring in Datadog

Troubleshooting

If you do not see any traces from Tyk appearing in Datadog, consider the following steps for resolution:
  • Logging: Examine logs from Tyk Gateway and from the OpenTelemetry Collector for any issues or warnings that might provide insights.
  • Data Ingestion Delays: Be patient, as there could be some delay in data ingestion. We configured a 10 second timeout in the batch processing of the OpenTelemetry collector in step 1, so give the system time to process the data.