contrib

package
v2.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 0 Imported by: 0

README

Godoc

These packages are Datadog's integrations for commonly used standard-library and community packages. Each one instruments a package in a "plug-and-play" manner: import the matching path and use the exposed functions, which mirror the original package's API and add tracing out of the box, with no need to create spans manually. Some integrations also add support for other Datadog products beyond APM, such as App and API Protection (AAP), Data Streams Monitoring (DSM), or Database Monitoring (DBM), and more.

These integrations are supported by our APM product.

Semantic conventions

Integrations can emit either Datadog or OpenTelemetry semantic conventions, configured by DD_TRACE_OTEL_SEMANTICS_ENABLED, with Datadog semantics being the default. New integrations should support and test both when applicable.

Using an integration

Each integration is a nested Go module, imported with the schema github.com/DataDog/dd-trace-go/contrib/<package path>/v2, where <package path> mirrors the instrumented package (for example net/http, gorilla/mux, google.golang.org/grpc). Check that integration's example_test.go for how to set it up and use it.

For the list of supported integrations, see the DataDog official documentation (supported integrations) and the godoc reference.

Contributing a new integration

See INTEGRATIONS.md for the full authoring guide, and ORCHESTRION.md for auto-instrumentation support via Orchestrion.

Version pinning

We aim to keep all integrated packages to their minimum working version without known vulnerabilities (based on reported CVEs). As integrated packages have different versioning policies regarding breaking changes, there is no guarantee that previously pinned versions will work with next dd-trace-go versions.

Deprecation

Integrations can be deprecated if all the following conditions are true:

  • The integrated package is deprecated or archived (no longer maintained).
  • A vulnerability is reported in the latest available version as CVE.

Documentation

Overview

The purpose of the packages held in contrib is to provide tracing on top of commonly used packages from the standard library as well as the community in a "plug-and-play" manner. This means that by simply importing the appropriate path, functions are exposed having the same signature as the original package. These functions return structures that embed the original return value, allowing them to be used as they normally would with tracing activated out of the box.

All of these libraries are supported by our https://www.datadoghq.com/apm/.

Integrations

Each integration is published as its own module:

Directories

Path Synopsis
cloud.google.com
go/pubsubtrace
Package pubsubtrace contains tracing logic for the cloud.google.com/go/pubsub instrumentation.
Package pubsubtrace contains tracing logic for the cloud.google.com/go/pubsub instrumentation.
confluentinc
confluent-kafka-go/kafkatrace
Package kafkatrace provides common tracing functionality for different confluentinc/confluent-kafka-go versions.
Package kafkatrace provides common tracing functionality for different confluentinc/confluent-kafka-go versions.
Package os provides integrations into the standard library's `os` package, allowing protection against Local File Inclusion (LFI) and Command Injection (CMDi) attacks.
Package os provides integrations into the standard library's `os` package, allowing protection against Local File Inclusion (LFI) and Command Injection (CMDi) attacks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL