Install Backend Error Tracking Using Datadog Tracing Libraries
To instrument your application with Datadog libraries:
- Install and configure the Agent.
- Add the Datadog tracing library to your code.
Install the Datadog Agent by following the relevant documentation.
To configure the agent for Error Tracking Backend only, you must be running Agent v7.61+.
Open the datadog.yaml configuration file.
Add core_agent
and apm_config
as top-level attributes anywhere in the configuration file with the following settings:
core_agent:
enabled: false
apm_config:
error_tracking_standalone:
enabled: true
Restart the Agent.
If you’re using the Docker containerized Agent, set the following environment variables:
DD_CORE_AGENT_ENABLED=false
DD_APM_ERROR_TRACKING_STANDALONE_ENABLED=true
Here’s an example of how you can include these settings in your Docker run command:
docker run -d --name datadog-agent \
--cgroupns host \
--pid host \
-e DD_API_KEY=<DATADOG_API_KEY> \
-e DD_CORE_AGENT_ENABLED=false \
-e DD_APM_ERROR_TRACKING_STANDALONE_ENABLED=true \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
gcr.io/datadoghq/agent:latest
If you’re deploying the Agent in Kubernetes, make the following changes in your Helm chart in addition to your Agent configuration:
agents:
containers:
agent:
env:
- name: DD_CORE_AGENT_ENABLED
value: "false"
datadog:
[...]
processAgent:
enabled: false
containerCollection: false
[...]
apm:
errorTrackingStandalone:
enabled: true
Instrument your application
Follow the relevant documentation to set up your application to send traces using one of the official Datadog tracing libraries.
Follow the OpenTelemetry API guide for your application language to manually send errors through span events.
Further Reading
Additional helpful documentation, links, and articles: