contrib/

directory
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: BSD-3-Clause

README

Libraries supported for tracing

All of these libraries are supported by our Application Performance Monitoring tool.

Usage

  1. Check if your library is supported (i.e. you find it in this directory).
    ex: if you're using the net/http package for your server, you see it's present in this directory.

  2. In your app, replace your import by our traced version of the library.
    ex:

import "net/http"

becomes

import "github.com/DataDog/dd-trace-go/contrib/net/http"
  1. Read through the example_test.go present in each folder of the libraries to understand how to trace your app.
    ex: for net/http, see net/http/example_test.go

Contribution guidelines

1. Follow the package naming convention

If a library looks like this: github.com/user/lib, the contribution must looks like this user/lib. In the case of the standard library, just use the path after src. E.g. src/database/sql becomes database/sql.

2. Respect the original API

Keep the original names for exported functions, don't use the prefix or suffix trace. E.g. prefer Open instead of OpenTrace.

Of course you can modify the number of arguments of a function if you need to pass the tracer for example.

Directories

Path Synopsis
database
sql
Package sqltraced provides a traced version of any driver implementing the database/sql/driver interface.
Package sqltraced provides a traced version of any driver implementing the database/sql/driver interface.
sql/parsedsn
Package parsedsn provides functions to parse any kind of DSNs into a map[string]string
Package parsedsn provides functions to parse any kind of DSNs into a map[string]string
sql/parsedsn/mysql
Package mysql is the minimal fork of go-sql-driver/mysql so we can use their code to parse the mysql DSNs
Package mysql is the minimal fork of go-sql-driver/mysql so we can use their code to parse the mysql DSNs
sql/parsedsn/pq
Package pq is the minimal fork of lib/pq so we can use their code to parse the postgres DSNs
Package pq is the minimal fork of lib/pq so we can use their code to parse the postgres DSNs
sql/sqltest
Package sqltest is used for testing sql packages
Package sqltest is used for testing sql packages
sql/sqlutils
Package sqlutils share some utils functions for sql packages
Package sqlutils share some utils functions for sql packages
garyburd
redigo
Package redigo provides tracing for the Redigo Redis client (https://github.com/garyburd/redigo)
Package redigo provides tracing for the Redigo Redis client (https://github.com/garyburd/redigo)
gin-gonic
gin
Package gin provides tracing middleware for the Gin web framework.
Package gin provides tracing middleware for the Gin web framework.
go-redis
redis
Package redis provides tracing for the go-redis Redis client (https://github.com/go-redis/redis)
Package redis provides tracing for the go-redis Redis client (https://github.com/go-redis/redis)
Package gocql provides tracing for the Cassandra Gocql client (https://github.com/gocql/gocql)
Package gocql provides tracing for the Cassandra Gocql client (https://github.com/gocql/gocql)
google.golang.org
gorilla
mux
Package mux provides tracing functions for the Gorilla Mux framework.
Package mux provides tracing functions for the Gorilla Mux framework.
jmoiron
sqlx
Package sqlxtraced provides a traced version of the "jmoiron/sqlx" package For more information about the API, see https://godoc.org/github.com/DataDog/dd-trace-go/tracer/contrib/sqltraced.
Package sqlxtraced provides a traced version of the "jmoiron/sqlx" package For more information about the API, see https://godoc.org/github.com/DataDog/dd-trace-go/tracer/contrib/sqltraced.
net
olivere
elastic
Package elastictrace provides tracing for the Elastic Elasticsearch client.
Package elastictrace provides tracing for the Elastic Elasticsearch client.

Jump to

Keyboard shortcuts

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