- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
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.
To complete this guide, ensure you have the following:
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:
Clone the opentelemetry-demo
repository to your device:
git clone https://github.com/open-telemetry/opentelemetry-demo.git
To send the demo’s telemetry data to Datadog you need to add three components to the the OpenTelemetry Collector configuration:
Resource Processor
is an optional
component which is recommended, used to set the env
tag for Datadog.Datadog Connector
is responsible for computing Datadog APM Trace Metrics.Datadog Exporter
is responsible for exporting Traces, Metrics and Logs to Datadog.Complete the following steps to configure these three components.
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:
exporters:
datadog:
traces:
span_name_as_resource_name: true
trace_buffer: 500
hostname: "otelcol-docker"
api:
site: ${env:DD_SITE_PARAMETER}
key: ${env:DD_API_KEY}
processors:
resource:
attributes:
- key: deployment.environment
value: "otel"
action: upsert
connectors:
datadog/connector:
traces:
span_name_as_resource_name: true
service:
pipelines:
traces:
processors: [resource, batch]
exporters: [otlp, debug, spanmetrics, datadog, datadog/connector]
metrics:
receivers: [docker_stats, httpcheck/frontendproxy, otlp, prometheus, redis, spanmetrics, datadog/connector]
processors: [resource, batch]
exporters: [otlphttp/prometheus, debug, datadog]
logs:
processors: [resource, batch]
exporters: [opensearch, debug, datadog]
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.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:
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
Create a file named my-values-file.yml
with the following content:
opentelemetry-collector:
extraEnvsFrom:
- secretRef:
name: dd-secrets
config:
exporters:
datadog:
traces:
span_name_as_resource_name: true
trace_buffer: 500
hostname: "otelcol-helm"
api:
site: ${DD_SITE_PARAMETER}
key: ${DD_API_KEY}
processors:
resource:
attributes:
- key: deployment.environment
value: "otel"
action: upsert
connectors:
datadog/connector:
traces:
span_name_as_resource_name: true
service:
pipelines:
traces:
processors: [resource, batch]
exporters: [otlp, debug, spanmetrics, datadog, datadog/connector]
metrics:
receivers: [httpcheck/frontendproxy, otlp, redis, spanmetrics, datadog/connector]
processors: [resource, batch]
exporters: [otlphttp/prometheus, debug, datadog]
logs:
processors: [resource, batch]
exporters: [opensearch, debug, datadog]
otelcol-config
file.If you have make installed, you can use the following command to start the demo:
make start
If you don’t have make
installed, you can use the the docker compose
command directly:
docker compose up --force-recreate --remove-orphans --detach
To deploy the demo application on Kubernetes using Helm, run the following command:
helm install my-otel-demo open-telemetry/opentelemetry-demo --values my-values-file.yml
You can access the Astronomy Shop web UI to explore the application and observe how the telemetry data is generated.
Go to http://localhost:8080.
If you are running a local cluster, you need to port forward the frontend proxy:
kubectl port-forward svc/my-otel-demo-frontendproxy 8080:8080
Go to http://localhost:8080.
The instrumentation steps used in all services from the Demo can be found on the main OpenTelemetry documentation.
You can find the language in which each service was implemented as well as its documentation in the language feature reference table.
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.
View all services that are part of the OTel Demo:
Explore traces received from the OTel Demo:
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.
The OpenTelemetry Demo includes flagd, a feature flag evaluation engine for simulating error scenarios.
src/flagd/demo.flagd.json
file and set the defaultVariant
to on
for one of the cases. See the OpenTelemetry Demo documentation for available cases.