.. | ||
database/sql | ||
garyburd/redigo | ||
gin-gonic/gin | ||
go-redis/redis | ||
gocql/gocql | ||
google.golang.org | ||
gorilla/mux | ||
jmoiron/sqlx | ||
net/http | ||
olivere/elastic | ||
README.md |
Libraries supported for tracing
All of these libraries are supported by our Application Performance Monitoring tool.
Usage
-
Check if your library is supported (i.e. you find it in this directory).
ex: if you're using thenet/http
package for your server, you see it's present in this directory. -
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"
- Read through the
example_test.go
present in each folder of the libraries to understand how to trace your app.
ex: fornet/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.