The datadog-agent must be running on the host and configured to collect APM data (this is enabled by default in the agent, unless you explicitly disabled it). See agent installation instructions here and the flag to enable APM here.
For the purposes of this guide, we assume that the datadog agent is accessible at a specific address from the docker container: http://localhost:8126.
Download pre-built amd64 and arm64 binaries for our latest release.
Alternatively, you can build the profiler from source. The following instructions assume you have docker installed.
Manual build instructions
To build the profiler, you can use the following commands:
make profiler-in-docker
This will create a dd-otel-host-profiler binary in the current directory.
To run the profiler, you need to make sure that tracefs is mounted. If it's not, you can run:
sudo mount -t tracefs tracefs /sys/kernel/tracing
After that, you can start the profiler as shown below (make sure you run it as root):
sudo DD_SERVICE="dd-otel-host-profiler" dd-otel-host-profiler --agent-url "http://localhost:8126"
If your Datadog agent is reachable under a different address, you can modify the --agent-url parameter accordingly.
To enable the profiler to upload debug symbols when they're available locally (required to have function names for compiled languages like C/C++/Rust/Go/...), you must configure:
- The
DD_SITEenvironment variable to your Datadog site (e.g.datadoghq.com,datadoghq.eu,us5.datadoghq.com, ...). - The
DD_API_KEYenvironment variable to your Datadog API key.