Single Step APM Instrumentation
Single Step APM Instrumentation is in beta!This feature is available in the latest Datadog Agent version.
- On Linux hosts and VMs
- On Docker containers
It supports tracing Java, Python, Ruby, Node.js, and .NET services on x86_64 architectures only. Try it out!
For Kubernetes deployments, a private beta is available for tracing Java, Python, Node.js, .NET and Ruby services. Fill out this form to request access.
Enable APM on your services in one step
If you install or update a Datadog Agent with the Enable APM Instrumentation (beta) option selected, the Agent is installed and configured to enable APM (with the DD_APM_INSTRUMENTATION_ENABLED
parameter) and to inject the Datadog tracing library into your code for automatic instrumentation, without any additional installation or configuration steps. Restart services for this instrumentation to take effect.
The following examples show how it works on each infrastructure type.
For example, on an Ubuntu host:
Run the one-line install command:
DD_API_KEY=<YOUR_DD_API_KEY> DD_SITE=”<YOUR_DD_SITE>” DD_APM_INSTRUMENTATION_ENABLED=host bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)”
This installs, configures, and starts the Agent with APM and Remote Configuration enabled, and sets up library injection for automatic instrumentation of all services on the host or VM.
Restart the services on the host or VM.
Explore the performance observability of your services in Datadog.
For example, for a Docker Linux container:
Install the library injector:
DD_APM_INSTRUMENTATION_ENABLED=docker bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
Configure the Agent in Docker:
docker run -d --name dd-agent \
-e DD_API_KEY=${DD_API_KEY} \
-e DD_APM_ENABLED=true \
-e DD_APM_NON_LOCAL_TRAFFIC=true \
-e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
-e DD_APM_RECEIVER_SOCKET=/opt/datadog/apm/inject/run/apm.socket \
-e DD_DOGSTATSD_SOCKET=/opt/datadog/apm/inject/run/dsd.socket \
-v /opt/datadog/apm:/opt/datadog/apm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
gcr.io/datadoghq/agent:7
Restart the Docker containers.
Explore the performance observability of your services in Datadog.
Removing Single Step APM instrumentation from your Agent
If you don’t want to collect trace data for a particular service, or for all services on a particular host, VM, or container, run one of the following commands directly on the relevant infrastructure to remove APM instrumentation.
Removing instrumentation for specific services
Run the following commands and restart the service to stop injecting the library into the service and stop producing traces from that service.
Add the DD_INSTRUMENT_SERVICE_WITH_APM
environment variable to the service startup command:
DD_INSTRUMENT_SERVICE_WITH_APM=false <service_start_command>
Restart the service.
- Add the
DD_INSTRUMENT_SERVICE_WITH_APM
environment variable to the service startup command:docker run -e DD_INSTRUMENT_SERVICE_WITH_APM=false
- Restart the service.
Removing APM for all services on the infrastructure
Run the following commands and restart the infrastructure to remove library injectors and stop producing traces.
- Run:
dd-host-install --uninstall
- Restart your host.
- Run:
dd-container-install --uninstall
- Restart your container.