- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
The Datadog Agent with embedded OpenTelemetry Collector is in Preview. To request access, fill out this form.
Request AccessThis guide explains how to build a Datadog Agent image with additional OpenTelemetry components not included in the default Datadog Agent. To see a list of components already included in the Agent by default, see Included components.
To complete this guide, you need the following:
Recommended:
Download the Dockerfile template:
agent-with-otel
) and cd into it.mkdir -p agent-with-otel
cd agent-with-otel
curl -o Dockerfile https://raw.githubusercontent.com/DataDog/datadog-agent/refs/tags/7.62.2/Dockerfiles/agent-ot/Dockerfile.agent-otel
The Dockerfile:
datadog/agent:7.62.2-ot-beta-jmx
.main
branch has the most up-to-date version of the Dockerfile. However, it is a development branch that is subject to frequent changes and is less stable than the release tags. For production and other stable use cases, use the tagged versions as listed in this guide.Create and customize an OpenTelemetry Collector Builder (OCB) manifest file, which defines the components to be included in your custom Datadog Agent.
curl -o manifest.yaml https://raw.githubusercontent.com/DataDog/datadog-agent/refs/tags/7.62.2/comp/otelcol/collector-contrib/impl/manifest.yaml
manifest.yaml
file and add the additional OpenTelemetry components to the corresponding sections (extensions, exporters, processors, receivers, or connectors).
The highlighted line in this example adds a metrics transform processor:dist:
module: github.com/DataDog/comp/otelcol/collector-contrib
name: otelcol-contrib
description: Datadog OpenTelemetry Collector
version: 0.115.0
output_path: ./comp/otelcol/collector-contrib/impl
otelcol_version: 0.115.0
extensions:
# You will see a list of extensions already included by Datadog
# Add your desired extensions here
exporters:
# You will see a list of exporters already included by Datadog
# Add your desired exporters here
processors:
# adding metrics transform processor to modify metrics
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0
receivers:
- gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.115.0
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.115.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0
connectors:
# You will see a list of connectors already included by Datadog
# Add your desired connectors here
The custom Agent image you build needs to be stored in your organization’s private container registry for your clusters to access it. Additionally, this build process must be repeated each time you update the Agent version to maintain compatibility with new Agent releases.
Build your custom Datadog Agent image and push it to a container registry.
docker build . -t agent-otel --no-cache \
--build-arg AGENT_VERSION="7.62.2-ot-beta-jmx" \
--build-arg AGENT_BRANCH="7.62.x"
docker tag agent-otel <IMAGE-NAME>/<IMAGE-TAG>
docker push <IMAGE-NAME>/<IMAGE-TAG>
<IMAGE-NAME>
and <IMAGE-TAG>
with your image name and desired tag. If the target repository is not Docker Hub, you need to include the repository name.datadog-values.yaml
agents:
image:
repository: <YOUR-REPO>
tag: <IMAGE-TAG>
doNotCheckTag: true
<YOUR-REPO>
and <IMAGE-TAG>
with your repository name and desired image tag.Create a sample configuration file and run your custom Agent to ensure everything is working correctly.
receivers:
otlp:
protocols:
http:
endpoint: "0.0.0.0:4318"
grpc:
endpoint: "0.0.0.0:4317"
processors:
batch:
send_batch_max_size: 1000
send_batch_size: 100
timeout: 10s
# Rename system.cpu.usage to system.cpu.usage_time
metricstransform:
transforms:
- include: system.cpu.usage
action: update
new_name: system.cpu.usage_time
exporters:
datadog:
api:
site: ${env:DD_SITE}
key: ${env:DD_API_KEY}
connectors:
datadog/connector:
traces:
compute_top_level_by_span_kind: true
peer_tags_aggregation: true
compute_stats_by_span_kind: true
service:
pipelines:
metrics:
receivers: [otlp, datadog/connector]
processors: [metricstransform, batch]
exporters: [datadog]
traces:
receivers: [otlp]
processors: [batch]
exporters: [datadog/connector]
traces/2:
receivers: [datadog/connector]
processors: [batch]
exporters: [datadog]
logs:
receivers: [otlp]
processors: [batch]
exporters: [datadog]
docker run -it \
-e DD_API_KEY=XX \
-e DD_SITE=datadoghq.com \
-e DD_HOSTNAME=datadog \
-v $(pwd)/config.yaml:/config.yaml \
-p 4317:4317 \
-p 4318:4318 \
--entrypoint otel-agent \
agent-otel --config /config.yaml
You can now use this new image to install the Agent. This enables Datadog monitoring capabilities along with the additional OpenTelemetry components you’ve added.
For detailed instructions on installing and configuring the Agent with added OpenTelemetry components, see the Install the Datadog Agent with Embedded OpenTelemetry Collector guide.
This section discusses some common issues you might encounter while building and running your custom Datadog Agent, along with their solutions:
awscontainerinsightreceiver
Problem: You may encounter errors related to awscontainerinsightreceiver
during the build:
#0 0.879 go: downloading github.com/tidwall/gjson v1.17.1
#0 0.889 go: downloading code.cloudfoundry.org/go-diodes v0.0.0-20240604201846-c756bfed2ed3
#0 0.916 go: downloading github.com/hashicorp/go-retryablehttp v0.7.5
#0 0.940 go: downloading github.com/tidwall/pretty v1.2.1
#0 88.24 # github.com/opencontainers/runc/libcontainer/cgroups/ebpf
#0 88.24 /go/pkg/mod/github.com/opencontainers/runc@v1.1.12/libcontainer/cgroups/ebpf/ebpf_linux.go:190:3: unknown field Replace in struct literal of type link.RawAttachProgramOptions
#0 89.14 # github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/k8sapiserver
#0 89.14 /go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver@v0.115.0/internal/k8sapiserver/k8sapiserver.go:47:68: undefined: record.EventRecorderLogger
------
Solution: Remove awscontainerinsightreceiver
from the manifest.yaml
file. This receiver has incompatible libraries and cannot be included in the build.
Problem: You receive the following error:
ERROR: failed to solve: process "/bin/sh -c . venv/bin/activate && invoke otel-agent.build" did not complete successfully: chown /var/lib/docker/overlay2/r75bx8o94uz6t7yr3ae6gop0b/work/work: no such file or directory
Solution: Run the build command again:
docker build . -t agent-otel --no-cache
Problem: You may encounter errors related to insufficient disk space, such as:
no space left on device
Solution: Clear up Docker space:
docker system prune -a
추가 유용한 문서, 링크 및 기사: