dd-trace-go

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: BSD-3-Clause

README

CircleCI Godoc

Installing

go get gopkg.in/DataDog/dd-trace-go.v1/...

Requires:

  • Go 1.9
  • Datadog's Trace Agent >= 5.21.1

Testing

Tests can be run locally using the Go toolset. The grpc.v12 integration will fail (and this is normal), because it covers for deprecated methods. In the CI environment we vendor this version of the library inside the integration. Under normal circumstances this is not something that we want to do, because users using this integration might be running versions different from the vendored one, creating hard to debug conflicts.

To run integration tests locally, you should set the INTEGRATION environment variable. The dependencies of the integration tests are best run via Docker. To get an idea about the versions and the set-up take a look at our CI config.

The best way to run the entire test suite is using the CircleCI CLI. Simply run circleci build in the repository root. Note that you might have to increase the resources dedicated to Docker to around 4GB.

Contributing

Pull requests for bug fixes are welcome, but before submitting new features or changes to current functionalities open an issue and discuss your ideas or propose the changes you wish to make. After a resolution is reached a PR can be submitted for review.

For commit messages, try to use the same conventions as most Go projects, for example:

contrib/database/sql: use method context on QueryContext and ExecContext

QueryContext and ExecContext were using the wrong context to create
spans. Instead of using the method's argument they were using the
Prepare context, which was wrong.

Fixes #113

Please apply the same logic for Pull Requests, start with the package name, followed by a colon and a description of the change, just like the official Go language.

Documentation

The API is documented on godoc as well as Datadog's official documentation. If you are migrating from an older version of the tracer (e.g. 0.6.x) you may also find the migration document we've put together helpful.

Directories

Path Synopsis
contrib
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).
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).
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).
gocql/gocql
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).
google.golang.org/grpc
Package grpc is a generated protocol buffer package.
Package grpc is a generated protocol buffer package.
google.golang.org/grpc.v12
Package grpc is a generated protocol buffer package.
Package grpc is a generated protocol buffer package.
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).
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).
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.
Package ddtrace contains the interfaces that specify the implementations of Datadog's tracing library, as well as a set of sub-packages containing various implementations: our native implementation ("tracer"), a wrapper that can be used with Opentracing ("opentracer") and a mock tracer to be used for testing ("mocktracer").
Package ddtrace contains the interfaces that specify the implementations of Datadog's tracing library, as well as a set of sub-packages containing various implementations: our native implementation ("tracer"), a wrapper that can be used with Opentracing ("opentracer") and a mock tracer to be used for testing ("mocktracer").
ext
Package ext contains a set of Datadog-specific constants.
Package ext contains a set of Datadog-specific constants.
mocktracer
Package mocktracer provides a mock implementation of the tracer used in testing.
Package mocktracer provides a mock implementation of the tracer used in testing.
opentracer
Package opentracer provides a wrapper on top of the Datadog tracer that can be used with Opentracing.
Package opentracer provides a wrapper on top of the Datadog tracer that can be used with Opentracing.
tracer
Package tracer contains Datadog's core tracing client.
Package tracer contains Datadog's core tracing client.

Jump to

Keyboard shortcuts

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