contrib/

directory
v1.67.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0

README

Godoc

The purpose of these packages 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 which 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 APM product.

⚠ These libraries are not built to be used with Opentracing. Opentracing integrations can be found in their own organisation.

Usage

First, find the library which you'd like to integrate with. The naming convention for the integration packages is:

  • If the package is from the standard library (eg. database/sql), it will be located at the same path.
  • If the package is hosted on Github (eg. github.com/user/repo) and has version v2.1.0, it will be located at the shorthand path user/repo.v2.
  • If the package is from anywhere else (eg. google.golang.org/grpc) and has no stable version, it can be found under the full import path, followed by the version suffix (in this example .v0).
  • All new integrations should be suffixed with .vN where N is the major version that is being covered. If the integration covers more than one major version, the minimum version supported should be chosen for the suffix. (ex. If the integration covers versions 2.x.x - 4.x.x, the suffix will be .v2)
  • The package itself should retain its un-versioned name. For example, the integration under user/repo.v2 stays as package repo, and does not become package repo.v2

Second, there are a few tags that should be found in all integration spans:

  • The span.kind tag should be set in root spans with either a client, server, producer, or consumer value according to the definitions found in the repository. If the value is determined to be internal, then omit the tag as that is the assumed default value. Otherwise, explicitly set it with a value from above.
  • The component tag should be set in all spans with the value equivalent to full naming convention of the integration package explained in the previous step.

Each integration comes with thorough documentation and usage examples. A good overview can be seen on our godoc page.

Instrumentation telemetry

Every integration is expected to import instrumentation telemetry to gather integration usage (more info here). Instrumentation telemetry can be enabled by adding the following init function to the new contrib package:

func init() {
    telemetry.LoadIntegration("package/import/path")
}

Directories

Path Synopsis
99designs
gqlgen
Package gqlgen contains an implementation of a gqlgen tracer, and functions to construct and configure the tracer.
Package gqlgen contains an implementation of a gqlgen tracer, and functions to construct and configure the tracer.
IBM
sarama.v1
Package sarama provides functions to trace the IBM/sarama package (https://github.com/IBM/sarama).
Package sarama provides functions to trace the IBM/sarama package (https://github.com/IBM/sarama).
Shopify
sarama
Package sarama provides functions to trace the Shopify/sarama package (https://github.com/Shopify/sarama).
Package sarama provides functions to trace the Shopify/sarama package (https://github.com/Shopify/sarama).
aws
aws-sdk-go-v2/aws
Package aws provides functions to trace aws/aws-sdk-go-v2 (https://github.com/aws/aws-sdk-go-v2).
Package aws provides functions to trace aws/aws-sdk-go-v2 (https://github.com/aws/aws-sdk-go-v2).
aws-sdk-go/aws
Package aws provides functions to trace aws/aws-sdk-go (https://github.com/aws/aws-sdk-go).
Package aws provides functions to trace aws/aws-sdk-go (https://github.com/aws/aws-sdk-go).
bradfitz
gomemcache/memcache
Package memcache provides functions to trace the bradfitz/gomemcache package (https://github.com/bradfitz/gomemcache).
Package memcache provides functions to trace the bradfitz/gomemcache package (https://github.com/bradfitz/gomemcache).
cloud.google.com
go/pubsub.v1
Package pubsub provides functions to trace the cloud.google.com/pubsub/go package.
Package pubsub provides functions to trace the cloud.google.com/pubsub/go package.
confluentinc
confluent-kafka-go/kafka
Package kafka provides functions to trace the confluentinc/confluent-kafka-go package (https://github.com/confluentinc/confluent-kafka-go).
Package kafka provides functions to trace the confluentinc/confluent-kafka-go package (https://github.com/confluentinc/confluent-kafka-go).
confluent-kafka-go/kafka.v2
Package kafka provides functions to trace the confluentinc/confluent-kafka-go package (https://github.com/confluentinc/confluent-kafka-go).
Package kafka provides functions to trace the confluentinc/confluent-kafka-go package (https://github.com/confluentinc/confluent-kafka-go).
database
sql
Package sql provides functions to trace the database/sql package (https://golang.org/pkg/database/sql).
Package sql provides functions to trace the database/sql package (https://golang.org/pkg/database/sql).
dimfeld
httptreemux.v5
Package httptreemux provides functions to trace the dimfeld/httptreemux/v5 package (https://github.com/dimfeld/httptreemux).
Package httptreemux provides functions to trace the dimfeld/httptreemux/v5 package (https://github.com/dimfeld/httptreemux).
elastic
go-elasticsearch.v6
Package elastic provides functions to trace the github.com/elastic/go-elasticsearch packages.
Package elastic provides functions to trace the github.com/elastic/go-elasticsearch packages.
emicklei
go-restful
Package restful provides functions to trace the emicklei/go-restful package (https://github.com/emicklei/go-restful).
Package restful provides functions to trace the emicklei/go-restful package (https://github.com/emicklei/go-restful).
go-restful.v3
Package restful provides functions to trace the emicklei/go-restful package (https://github.com/emicklei/go-restful).
Package restful provides functions to trace the emicklei/go-restful package (https://github.com/emicklei/go-restful).
garyburd
redigo
Package redigo provides functions to trace the garyburd/redigo package (https://github.com/garyburd/redigo).
Package redigo provides functions to trace the garyburd/redigo package (https://github.com/garyburd/redigo).
gin-gonic
gin
Package gin provides functions to trace the gin-gonic/gin package (https://github.com/gin-gonic/gin).
Package gin provides functions to trace the gin-gonic/gin package (https://github.com/gin-gonic/gin).
globalsign
mgo
Package mgo provides functions and types which allow tracing of the MGO MongoDB client (https://github.com/globalsign/mgo)
Package mgo provides functions and types which allow tracing of the MGO MongoDB client (https://github.com/globalsign/mgo)
go-chi
chi
Package chi provides tracing functions for tracing the go-chi/chi package (https://github.com/go-chi/chi).
Package chi provides tracing functions for tracing the go-chi/chi package (https://github.com/go-chi/chi).
chi.v5
Package chi provides tracing functions for tracing the go-chi/chi/v5 package (https://github.com/go-chi/chi).
Package chi provides tracing functions for tracing the go-chi/chi/v5 package (https://github.com/go-chi/chi).
go-pg
go-redis
redis
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
redis.v7
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
redis.v8
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
Package redis provides tracing functions for tracing the go-redis/redis package (https://github.com/go-redis/redis).
go.mongodb.org
mongo-driver/mongo
Package mongo provides functions to trace the mongodb/mongo-go-driver package (https://github.com/mongodb/mongo-go-driver).
Package mongo provides functions to trace the mongodb/mongo-go-driver package (https://github.com/mongodb/mongo-go-driver).
Package gocql provides functions to trace the gocql/gocql package (https://github.com/gocql/gocql).
Package gocql provides functions to trace the gocql/gocql package (https://github.com/gocql/gocql).
gofiber
fiber.v2
Package fiber provides tracing functions for tracing the fiber package (https://github.com/gofiber/fiber).
Package fiber provides tracing functions for tracing the fiber package (https://github.com/gofiber/fiber).
gomodule
redigo
Package redigo provides functions to trace the gomodule/redigo package (https://github.com/gomodule/redigo).
Package redigo provides functions to trace the gomodule/redigo package (https://github.com/gomodule/redigo).
google.golang.org
api
Package api provides functions to trace the google.golang.org/api package.
Package api provides functions to trace the google.golang.org/api package.
grpc
Package grpc provides functions to trace the google.golang.org/grpc package v1.2.
Package grpc provides functions to trace the google.golang.org/grpc package v1.2.
grpc.v12
Package grpc is a generated protocol buffer package.
Package grpc is a generated protocol buffer package.
gopkg.in
jinzhu/gorm.v1
Package gorm provides helper functions for tracing the jinzhu/gorm package (https://github.com/jinzhu/gorm).
Package gorm provides helper functions for tracing the jinzhu/gorm package (https://github.com/jinzhu/gorm).
gorilla
mux
Package mux provides tracing functions for tracing the gorilla/mux package (https://github.com/gorilla/mux).
Package mux provides tracing functions for tracing the gorilla/mux package (https://github.com/gorilla/mux).
gorm.io
gorm.v1
Package gorm provides helper functions for tracing the gorm.io/gorm package (https://github.com/go-gorm/gorm).
Package gorm provides helper functions for tracing the gorm.io/gorm package (https://github.com/go-gorm/gorm).
graph-gophers
graphql-go
Package graphql provides functions to trace the graph-gophers/graphql-go package (https://github.com/graph-gophers/graphql-go).
Package graphql provides functions to trace the graph-gophers/graphql-go package (https://github.com/graph-gophers/graphql-go).
graphql-go
hashicorp
vault
Package vault contains functions to construct or augment an http.Client that will integrate with the github.com/hashicorp/vault/api and collect traces to send to Datadog.
Package vault contains functions to construct or augment an http.Client that will integrate with the github.com/hashicorp/vault/api and collect traces to send to Datadog.
internal
httptrace
Package httptrace provides functionalities to trace HTTP requests that are commonly required and used across contrib/** integrations.
Package httptrace provides functionalities to trace HTTP requests that are commonly required and used across contrib/** integrations.
namingschematest
Package namingschematest provides utilities to test naming schemas across different integrations.
Package namingschematest provides utilities to test naming schemas across different integrations.
jackc
jinzhu
gorm
Package gorm provides helper functions for tracing the jinzhu/gorm package (https://github.com/jinzhu/gorm).
Package gorm provides helper functions for tracing the jinzhu/gorm package (https://github.com/jinzhu/gorm).
jmoiron
sqlx
Package sqlx provides functions to trace the jmoiron/sqlx package (https://github.com/jmoiron/sqlx).
Package sqlx provides functions to trace the jmoiron/sqlx package (https://github.com/jmoiron/sqlx).
julienschmidt
httprouter
Package httprouter provides functions to trace the julienschmidt/httprouter package (https://github.com/julienschmidt/httprouter).
Package httprouter provides functions to trace the julienschmidt/httprouter package (https://github.com/julienschmidt/httprouter).
k8s.io
client-go/kubernetes
Package kubernetes provides functions to trace k8s.io/client-go (https://github.com/kubernetes/client-go).
Package kubernetes provides functions to trace k8s.io/client-go (https://github.com/kubernetes/client-go).
labstack
echo
Package echo provides functions to trace the labstack/echo package (https://github.com/labstack/echo).
Package echo provides functions to trace the labstack/echo package (https://github.com/labstack/echo).
echo.v4
Package echo provides functions to trace the labstack/echo package (https://github.com/labstack/echo).
Package echo provides functions to trace the labstack/echo package (https://github.com/labstack/echo).
log
slog
Package slog provides functions to correlate logs and traces using log/slog package (https://pkg.go.dev/log/slog).
Package slog provides functions to correlate logs and traces using log/slog package (https://pkg.go.dev/log/slog).
miekg
dns
net
http
Package http provides functions to trace the net/http package (https://golang.org/pkg/net/http).
Package http provides functions to trace the net/http package (https://golang.org/pkg/net/http).
olivere
elastic
Package elastic provides functions to trace the gopkg.in/olivere/elastic.v{3,5} packages.
Package elastic provides functions to trace the gopkg.in/olivere/elastic.v{3,5} packages.
redis
go-redis.v9
Package redis provides functions to trace the redis/go-redis package (https://github.com/redis/go-redis).
Package redis provides functions to trace the redis/go-redis package (https://github.com/redis/go-redis).
segmentio
sirupsen
logrus
Package logrus provides a log/span correlation hook for the sirupsen/logrus package (https://github.com/sirupsen/logrus).
Package logrus provides a log/span correlation hook for the sirupsen/logrus package (https://github.com/sirupsen/logrus).
syndtr
goleveldb/leveldb
Package leveldb provides functions to trace the syndtr/goleveldb package (https://github.com/syndtr/goleveldb).
Package leveldb provides functions to trace the syndtr/goleveldb package (https://github.com/syndtr/goleveldb).
tidwall
twitchtv
twirp
Package twirp provides tracing functions for tracing clients and servers generated by the twirp framework (https://github.com/twitchtv/twirp).
Package twirp provides tracing functions for tracing clients and servers generated by the twirp framework (https://github.com/twitchtv/twirp).
uptrace
bun
Package bun provides helper functions for tracing the github.com/uptrace/bun package (https://github.com/uptrace/bun).
Package bun provides helper functions for tracing the github.com/uptrace/bun package (https://github.com/uptrace/bun).
urfave
negroni
Package negroni provides helper functions for tracing the urfave/negroni package (https://github.com/urfave/negroni).
Package negroni provides helper functions for tracing the urfave/negroni package (https://github.com/urfave/negroni).
valyala
fasthttp.v1
Package fasthttp provides functions to trace the valyala/fasthttp package (https://github.com/valyala/fasthttp)
Package fasthttp provides functions to trace the valyala/fasthttp package (https://github.com/valyala/fasthttp)
zenazn
goji.v1/web
Package web provides functions to trace the zenazn/goji/web package (https://github.com/zenazn/goji).
Package web provides functions to trace the zenazn/goji/web package (https://github.com/zenazn/goji).

Jump to

Keyboard shortcuts

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