Open-source, OpenTelemetry-native observability platform that brings logs, metrics, traces, alerts and dashboards into one self-hostable tool.
DataDog/dd-trace-go
Datadog's official Go client library for APM tracing, continuous profiling, and application security monitoring.
- Stars
- 861
- Forks
- 558
- Open issues
- 299
- Last commit
- 7 hours ago
What is it?
dd-trace-go is the client-side Go library for Datadog's Application Performance Monitoring, Continuous Profiler, and Application Security Management products. The tracer package lets you instrument arbitrary Go code, while a large set of contrib packages, published as nested modules, automatically trace commonly used libraries such as net/http, gorilla/mux, and database/sql.
The profiler package periodically collects Go profiles (CPU, memory, and synchronization) and sends them to the Datadog API, broken down by function and line. Application Security Management runs inside the APM tracer and can be enabled with the DD_APPSEC_ENABLED environment variable, detecting attacks such as SSRF, SQL injection, and XSS.
Most users install the tracer and profiler packages and add contrib modules for the libraries their services use. The project supports the two latest Go releases and first-class Go ports.
Key features
- 01Traces requests across web servers, databases, and microservices, including custom code spans.
- 02Ships out-of-the-box integrations for common Go libraries via contrib modules.
- 03Collects continuous CPU, memory, and synchronization profiles broken down by function and line.
- 04Enables in-app attack detection for SSRF, SQL injection, and XSS through an environment variable.
- 05Supports the two latest Go releases and first-class Go ports.
Use cases
- Finding slow requests and bottlenecks across microservices in a Go backend.
- Tracking CPU and memory hotspots in production Go services to reduce latency and infrastructure cost.
- Adding in-app detection of injection and SSRF attacks to Go web applications monitored by Datadog.
Quick start
- 1
Install the core tracer package
go get github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - 2
Install the continuous profiler package
go get github.com/DataDog/dd-trace-go/v2/profiler
Things to know
- Requires a Datadog account and Agent to view the collected data.
- Only officially supports the two latest Go releases and first-class ports.
- License is listed as NOASSERTION, so check the repository license terms before use.
Topics
FAQ
- What is dd-trace-go?
- Datadog's official Go client library for APM tracing, continuous profiling, and application security monitoring. dd-trace-go is the client-side Go library for Datadog's Application Performance Monitoring, Continuous Profiler, and Application Security Management products. The tracer package lets you instrument arbitrary Go code, while a large set of contrib packages, published as nested modules, automatically trace commonly used libraries such as net/http, gorilla/mux, and database/sql.
- Is dd-trace-go free to use? What license does it have?
- dd-trace-go is open source under the Other license. Check the license terms before using it in commercial products.
- Is dd-trace-go still maintained?
- Actively maintained. The last commit to dd-trace-go was on Oct 21, 2026.
- What can I use dd-trace-go for?
- Finding slow requests and bottlenecks across microservices in a Go backend. Tracking CPU and memory hotspots in production Go services to reduce latency and infrastructure cost. Adding in-app detection of injection and SSRF attacks to Go web applications monitored by Datadog.
- How do I install dd-trace-go?
- Install the core tracer package: go get github.com/DataDog/dd-trace-go/v2/ddtrace/tracer Install the continuous profiler package: go get github.com/DataDog/dd-trace-go/v2/profiler
- Where can I get dd-trace-go?
- The source code and installation instructions are on GitHub: https://github.com/DataDog/dd-trace-go
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Self-hostable observability platform for logs, metrics, traces, RUM and LLM monitoring, built in Rust and positioned as an alternative to Datadog and Splunk.
An APM system for monitoring, tracing and diagnosing distributed and cloud-native microservice architectures.
Open-source observability platform for searching and visualizing logs, traces, metrics, session replays and errors on top of ClickHouse.
Open-source observability and APM tool that uses eBPF to collect metrics, logs, traces and profiles, with AI-assisted root cause analysis.
Open-source observability platform combining uptime monitoring, status pages, incident management, on-call alerts, logs, traces, and metrics in one self-hostable app.