The OpenTelemetry Demo is a microservices demo application developed by the community to demonstrate OpenTelemetry (OTel)
instrumentation and its observability capabilities. It is an e-commerce web page composed of multiple microservices communicating with each other through HTTP and gRPC. All services are instrumented with OpenTelemetry and produce traces, metrics, and logs.
This page guides you through the steps required to deploy the OpenTelemetry Demo and send its data to Datadog.
You can deploy the demo using Docker or Kubernetes (with Helm). Choose your preferred deployment method and make sure you have the necessary tools installed:
Open the demo repository. Create a file called docker-compose.override.yml in the root folder.
Open the created file. Paste the following content and set the Datadog site and Datadog API key environment variables:
services:otelcol:command:- "--config=/etc/otelcol-config.yml"- "--config=/etc/otelcol-config-extras.yml"- "--feature-gates=exporter.datadogexporter.UseLogsAgentExporter"environment:- DD_SITE_PARAMETER=<Your API Site>- DD_API_KEY=<Your API Key>
To configure the OpenTelemetry Collector, open src/otelcollector/otelcol-config-extras.yml and add the following to the file:
By default, the collector in the demo application merges the configuration from two files:
src/otelcollector/otelcol-config.yml: contains the default configuration for the collector.
src/otelcollector/otelcol-config-extras.yml: used to add extra configuration to the collector.
When merging YAML values, objects are merged and arrays are replaced.
That's why there are more components specified in the pipelines than actually configured.
The previous configuration does not replace the values configured in the main otelcol-config file.
Create a secret named dd-secrets to store Datadog Site and API Key secrets:
kubectl create secret generic dd-secrets --from-literal="DD_SITE_PARAMETER=<Your API Site>" --from-literal="DD_API_KEY=<Your API Key>"
Add the OpenTelemetry Helm chart to your repo to manage and deploy the OpenTelemetry Demo:
When merging YAML values, objects are merged and arrays are replaced.
That's why there are more components specified in the pipelines than actually configured.
The previous configuration does not replace the values configured in the main otelcol-config file.
When the OTel Demo is running, the built-in load generator simulates traffic in the application.
After a couple of seconds you can see data arriving in Datadog.
Datadog allows you to filter and group the received OpenTelemetry data. For example, to find all transactions from a specific user, you can use Trace Queries.
The OTel Demo sends user.id as span tags, so you can use this to filter all transactions triggered by the user:
From Info in the side panel, hover over the line with the user ID, click the cog icon, and select filter by @app.user.id:<user_id>.
Remove any previous filters, leaving only @app.user.id applied to view all transactions containing spans with the specified user ID.