Skip to content

Datadog APM SDK

Grow Codes CI License

One API for Datadog APM in five languages: TypeScript, Rust, Go, Python and Java. Every package has the same functions, options, defaults, error codes and behaviour, tested against the real Datadog Agent (datadog/agent:7.85.4, forwarding to Datadog's test intake datadog/fakeintake) in Docker. The packages use the official OpenTelemetry SDK of each language; they contain no Datadog tracer (dd-trace) code.

Language Package Coverage
TypeScript @grow-codes/datadog-apm TypeScript coverage
Rust grow-datadog-apm Rust coverage
Go github.com/grow-codes-packages/datadog-apm/go Go coverage
Python grow-datadog-apm Python coverage
Java codes.grow.packages:datadog-apm Java coverage

What you get

  • Tracing to the Datadog Agent: OpenTelemetry setup in one call, exporting OTLP (HTTP/protobuf on 4318 or gRPC on 4317) with unified service tagging (service, env, version) (Tracing setup).
  • Datadog propagation: x-datadog-* headers next to W3C trace context, with the same conflict rules as the Datadog tracers, so traces cross services that use dd-trace (Propagation and ids).
  • Error Tracking ready: recordException / setError also set error.type, error.message and error.stack.
  • Log correlation: datadogLogFields() (dd.trace_id, dd.span_id, dd.service, …) and 64/128-bit id helpers.
  • Spans query with an API key and an application key: search and aggregate indexed spans, read traces back, list services and operations (Spans query).
  • Client with Agent health, ping and version (Client functions).
  • Configuration from code or GROW_DATADOG_APM_* / DD_* / OTEL_* environment variables, immutable and validated (Configuration).
  • Retries with full-jitter backoff and Retry-After, connect/request/total timeouts and cancellation in every language; typed errors with one set of codes (Error handling).
  • Redaction everywhere: API and application keys never appear in errors, logs, hooks or toString (Redaction).

Start with Install and the Quickstart.

Independent project

This SDK is made by Grow Codes. Datadog and Datadog APM are trademarks of Datadog, Inc. This project is not affiliated with or endorsed by Datadog, Inc. See License & disclaimer.