Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 2.03 KB

File metadata and controls

47 lines (29 loc) · 2.03 KB

Running the profiler directly on the host

Prerequisites

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.

Installation

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.

Running the profiler

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_SITE environment variable to your Datadog site (e.g. datadoghq.com, datadoghq.eu, us5.datadoghq.com, ...).
  • The DD_API_KEY environment variable to your Datadog API key.