To get started with Datadog APM, you need to follow these key steps:
Install and configure the Datadog Agent.
Instrument your application.
Simplify your setup! Install the Agent and instrument your application in one step with Single Step Instrumentation.
Instrumenting your application allows observability data to be sent to the Agent, which then passes data to the Datadog backend to display in the UI.
Instrumentation types
There are two main approaches to instrument your application:
Automatic instrumentation creates A span is a logical unit of work in a distributed system for a given period.Glossarys for your application with minimal manual steps, capturing essential observability data across common libraries and languages with minimal configuration.
Custom instrumentation captures observability data from in-house code or complex functions that aren’t captured by automatic instrumentation, providing deeper visibility and context into spans when you need fine-grained control.
The following table compares the different instrumentation methods available.
If you prefer vendor-neutral instrumentation, see the OpenTelemetry documentation for using OpenTelemetry API support in Datadog libraries.
With a single command, Datadog automatically loads language SDKs to your application processes. You can also control which processes to instrument.
Add Datadog language SDKs to your applications. The SDK handles instrumentation automatically.
Add explicit tracing API calls or span logic in your application code.
Add instrumentation rules in the Datadog UI. Rules are applied dynamically at runtime and do not require code changes.
Code changes?
No
No
Yes
No
Environment config changes?
No
Yes
Yes
No
Setup complexity
Low
Medium
High
Low
Best for
SRE, admins, or central teams who want tracing across services without developer involvement.
App dev teams who want to instrument applications individually with granular control over configuration through environment variables.
Teams needing custom logic, specialized spans, or visibility into custom code paths.
Teams wanting to add spans, logs, or metrics to specific code locations at runtime without redeploying or modifying source code. Configuration is managed through the Datadog UI.
Use cases
Capturing essential observability data across common libraries and languages with minimal configuration.
Enabling real-time monitoring with pre-configured settings for immediate insights into application performance.
Simplifying the observability setup for projects where custom instrumentation is not required.
Collecting observability data from custom code with unique or complex business logic.
Providing deeper visibility and context into spans, including adding span tags.
Precisely monitoring specific sequences of operations or user interactions that require fine-grained control.
Removing unwanted spans from traces.
APM setup tutorials
The following tutorials guide you through setting up distributed tracing for a sample application on various infrastructure scenarios, with both automatic and custom instrumentation, using the Datadog tracing libraries: