Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DataDog/dd-trace-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.1
Choose a base ref
...
head repository: DataDog/dd-trace-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Sep 27, 2017

  1. Copy the full SHA
    7b1f4bd View commit details
  2. Copy the full SHA
    7c03c51 View commit details
  3. Copy the full SHA
    f0a3eb9 View commit details
  4. Copy the full SHA
    e1e1825 View commit details
  5. Copy the full SHA
    442f96e View commit details
  6. Copy the full SHA
    b12a26b View commit details
  7. Copy the full SHA
    22423d4 View commit details
  8. Copy the full SHA
    2f9139d View commit details
  9. Copy the full SHA
    2c701df View commit details

Commits on Oct 3, 2017

  1. Use a stable version of gometalinter (v1.2.1)

    gabsn committed Oct 3, 2017
    Copy the full SHA
    58b12aa View commit details

Commits on Oct 4, 2017

  1. Merge pull request #118 from DataDog/gabin/gometalinter

    Fix dd-trace-go CI
    ufoot authored Oct 4, 2017
    Copy the full SHA
    0d8aa90 View commit details
  2. Copy the full SHA
    42bb15a View commit details
  3. Copy the full SHA
    ef5bcdf View commit details
  4. Copy the full SHA
    e121352 View commit details
  5. Copy the full SHA
    d97aa96 View commit details
  6. Copy the full SHA
    95b17fb View commit details
  7. Copy the full SHA
    540caa1 View commit details

Commits on Oct 5, 2017

  1. Update README.md

    gabsn authored Oct 5, 2017
    Copy the full SHA
    05c80ba View commit details

Commits on Nov 14, 2017

  1. [ci] modularize Rakefile tasks

    Emanuele Palazzetti committed Nov 14, 2017
    Copy the full SHA
    efb9ddf View commit details
  2. [ci] update CircleCI script so that CI tasks are not defined in the R…

    …akefile
    Emanuele Palazzetti committed Nov 14, 2017
    Copy the full SHA
    551407f View commit details

Commits on Nov 20, 2017

  1. [ci] download dependencies also for tests

    Emanuele Palazzetti committed Nov 20, 2017
    Copy the full SHA
    38a34c0 View commit details

Commits on Nov 22, 2017

  1. [cassandra] DisableInitialHostLookup on tests to fix the cluster conn…

    …ection
    Emanuele Palazzetti committed Nov 22, 2017
    Copy the full SHA
    edf74f8 View commit details

Commits on Nov 27, 2017

  1. [ci] use the right code.cov report

    Emanuele Palazzetti committed Nov 27, 2017
    Copy the full SHA
    61ac229 View commit details
  2. [ci] garbage collection and fast linting

    Emanuele Palazzetti committed Nov 27, 2017
    Copy the full SHA
    fcc8510 View commit details
  3. [docs] README includes more information about contributions

    Kent Shultz authored and Emanuele Palazzetti committed Nov 27, 2017
    Copy the full SHA
    401a2fe View commit details
  4. [docs] update README instructions with newer rake commands

    Emanuele Palazzetti committed Nov 27, 2017
    Copy the full SHA
    4f7063f View commit details
  5. Merge pull request #123 from palazzem/ci-build-system

    [ci] update the Continuous Integration
    Emanuele Palazzetti authored Nov 27, 2017
    Copy the full SHA
    485b4dd View commit details
  6. Merge pull request #101 from kent/dev-quick-start

    Fill out README with Contributor Quick Start
    Emanuele Palazzetti authored Nov 27, 2017
    Copy the full SHA
    290a850 View commit details
  7. Contraction (it's) to possessive pronoun (its) (#121)

    mogigoma authored and Emanuele Palazzetti committed Nov 27, 2017
    Copy the full SHA
    98b8af5 View commit details

Commits on Nov 28, 2017

  1. [tools] add dep to manage vendor folder (#124)

    Emanuele Palazzetti authored Nov 28, 2017
    Copy the full SHA
    efd39b7 View commit details

Commits on Nov 30, 2017

  1. Fix grpc metadata

    closes #120
    Jerry Liu committed Nov 30, 2017
    Copy the full SHA
    182fc9b View commit details
  2. Merge pull request #125 from jerryliu/fix-grpc-from-context

    Fix grpc metadata
    Emanuele Palazzetti authored Nov 30, 2017
    Copy the full SHA
    f1a94ef View commit details

Commits on Dec 1, 2017

  1. [opentracing] ensure that OpenTracing is not vendered by dep; our tra…

    …cer must use the version available from the user environment
    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    d06a3ca View commit details
  2. [opentracing] provide Span, SpanContext and Tracer implementations fo…

    …r OT interfaces
    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    8d966a0 View commit details
  3. [opentracing] add SpanContext implementation

    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    00e7898 View commit details
  4. [opentracing] provide partial Span implementation; logs and finishing…

    … with options are missing
    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    62b74b4 View commit details
  5. [opentracing] provide a Configuration system to initialize the Datado…

    …g Tracer with the OpenTracing interface
    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    701df13 View commit details
  6. [opentracing] update Datadog OpenTracing API

    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    5cce7d7 View commit details
  7. [opentracing] add test and linting to the package

    Emanuele Palazzetti committed Dec 1, 2017
    Copy the full SHA
    345a98c View commit details

Commits on Dec 4, 2017

  1. [opentracing] provide default service name

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    719a1f0 View commit details
  2. [opentracing] OpenTracing Span embeds *Span

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    fbfde3d View commit details
  3. [opentracing] back reference from SpanContext to Span

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    4a17da0 View commit details
  4. [opentracing] Tracer start span initial implementation

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    60d783b View commit details
  5. Copy the full SHA
    e47bb55 View commit details
  6. [opentracing] tags are evaluated in options

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    06e85ee View commit details
  7. [opentracing] start time is evaluated in options

    Emanuele Palazzetti committed Dec 4, 2017
    Copy the full SHA
    a0ba9da View commit details
  8. Copy the full SHA
    f2504d3 View commit details

Commits on Dec 5, 2017

  1. [opentracing] NewTracer in the tracer.go

    Emanuele Palazzetti committed Dec 5, 2017
    Copy the full SHA
    ba8ef2a View commit details
  2. [opentracing] add SampleRate value in test

    Emanuele Palazzetti committed Dec 5, 2017
    Copy the full SHA
    a72b5e6 View commit details
  3. [opentracing] merge test for Configuration

    Emanuele Palazzetti committed Dec 5, 2017
    Copy the full SHA
    cc9843f View commit details
Showing with 4,139 additions and 7,230 deletions.
  1. +85 −0 .circleci/config.yml
  2. +0 −13 .env
  3. +29 −0 Gopkg.toml
  4. +2 −0 LICENSE-3rdparty.csv
  5. +55 −8 README.md
  6. +0 −120 Rakefile
  7. +0 −39 circle.yml
  8. +13 −30 contrib/README.md
  9. +122 −0 contrib/database/sql/conn.go
  10. +82 −0 contrib/database/sql/driver.go
  11. +17 −133 contrib/database/sql/example_test.go
  12. +81 −0 contrib/database/sql/internal/dsn.go
  13. +99 −0 contrib/database/sql/internal/dsn_test.go
  14. +25 −6 contrib/database/sql/{parsedsn/mysql/dsn.go → internal/mysql.go}
  15. +79 −3 tracer/contrib/sqltraced/parsedsn/pq/conn.go → contrib/database/sql/internal/postgres.go
  16. +0 −41 contrib/database/sql/mysql_test.go
  17. +28 −0 contrib/database/sql/option.go
  18. +0 −42 contrib/database/sql/parse.go
  19. +0 −44 contrib/database/sql/parse_test.go
  20. +0 −25 contrib/database/sql/parsedsn/mysql/collations.go
  21. +0 −3 contrib/database/sql/parsedsn/mysql/mysql.go
  22. +0 −23 contrib/database/sql/parsedsn/mysql/utils.go
  23. +0 −47 contrib/database/sql/parsedsn/parsedsn.go
  24. +0 −49 contrib/database/sql/parsedsn/parsedsn_test.go
  25. +0 −118 contrib/database/sql/parsedsn/pq/conn.go
  26. +0 −2 contrib/database/sql/parsedsn/pq/pq.go
  27. +0 −76 contrib/database/sql/parsedsn/pq/url.go
  28. +0 −41 contrib/database/sql/pq_test.go
  29. +43 −367 contrib/database/sql/sql.go
  30. +94 −0 contrib/database/sql/sql_test.go
  31. +0 −211 contrib/database/sql/sqltest/sqltest.go
  32. +0 −2 contrib/database/sql/sqlutils/sqlutils.go
  33. +0 −59 contrib/database/sql/sqlutils/utils.go
  34. +0 −17 contrib/database/sql/sqlutils/utils_test.go
  35. +83 −0 contrib/database/sql/stmt.go
  36. +35 −0 contrib/database/sql/tx.go
  37. +0 −36 contrib/database/sql/utils.go
  38. +0 −29 contrib/database/sql/utils_test.go
  39. +25 −6 contrib/garyburd/redigo/example_test.go
  40. +29 −0 contrib/garyburd/redigo/option.go
  41. +71 −48 contrib/garyburd/redigo/redigo.go
  42. +61 −72 contrib/garyburd/redigo/redigo_test.go
  43. +9 −16 contrib/gin-gonic/gin/example_test.go
  44. +36 −105 contrib/gin-gonic/gin/gintrace.go
  45. +25 −65 contrib/gin-gonic/gin/gintrace_test.go
  46. +27 −56 contrib/go-redis/redis/example_test.go
  47. +29 −0 contrib/go-redis/redis/option.go
  48. +86 −78 contrib/go-redis/redis/redis.go
  49. +25 −76 contrib/go-redis/redis/redis_test.go
  50. +3 −2 contrib/gocql/gocql/example_test.go
  51. +51 −46 contrib/gocql/gocql/gocql.go
  52. +31 −44 contrib/gocql/gocql/gocql_test.go
  53. +29 −0 contrib/gocql/gocql/option.go
  54. 0 {tracer/contrib/tracegrpc → contrib/google.golang.org/grpc.v12}/compile.sh
  55. +59 −0 contrib/google.golang.org/grpc.v12/example_test.go
  56. +1 −2 {tracer/contrib/tracegrpc → contrib/google.golang.org/grpc.v12}/fixtures.proto
  57. +7 −7 {tracer/contrib/tracegrpc → contrib/google.golang.org/grpc.v12}/fixtures_test.go
  58. +24 −10 {tracer/contrib/tracegrpc → contrib/google.golang.org/grpc.v12}/grpc.go
  59. +23 −64 {tracer/contrib/tracegrpc → contrib/google.golang.org/grpc.v12}/grpc_test.go
  60. +30 −0 contrib/google.golang.org/grpc.v12/option.go
  61. +59 −0 contrib/google.golang.org/grpc/example_test.go
  62. +0 −1 contrib/google.golang.org/grpc/fixtures.proto
  63. +24 −9 contrib/google.golang.org/grpc/grpc.go
  64. +17 −58 contrib/google.golang.org/grpc/grpc_test.go
  65. +29 −0 contrib/google.golang.org/grpc/option.go
  66. +9 −17 contrib/gorilla/mux/example_test.go
  67. +38 −111 contrib/gorilla/mux/mux.go
  68. +68 −140 contrib/gorilla/mux/mux_test.go
  69. +29 −0 contrib/gorilla/mux/option.go
  70. +223 −0 contrib/internal/sqltest/sqltest.go
  71. +67 −0 contrib/internal/trace.go
  72. +20 −9 contrib/jmoiron/sqlx/example_test.go
  73. +0 −41 contrib/jmoiron/sqlx/mysql_test.go
  74. +0 −41 contrib/jmoiron/sqlx/pq_test.go
  75. +47 −20 contrib/jmoiron/sqlx/sql.go
  76. +95 −0 contrib/jmoiron/sqlx/sql_test.go
  77. +35 −0 contrib/julienschmidt/httprouter/example_test.go
  78. +42 −0 contrib/julienschmidt/httprouter/httprouter.go
  79. +136 −0 contrib/julienschmidt/httprouter/httprouter_test.go
  80. +29 −0 contrib/julienschmidt/httprouter/option.go
  81. +11 −5 contrib/net/http/example_test.go
  82. +33 −68 contrib/net/http/http.go
  83. +32 −2 contrib/net/http/http_test.go
  84. +29 −0 contrib/net/http/option.go
  85. +50 −39 contrib/olivere/elastic/elastictrace.go
  86. +50 −23 contrib/olivere/elastic/elastictrace_test.go
  87. +4 −3 contrib/olivere/elastic/example_test.go
  88. +41 −0 contrib/olivere/elastic/option.go
  89. +0 −26 contrib/olivere/elastic/quantize.go
  90. +0 −43 contrib/olivere/elastic/quantize_test.go
  91. +0 −43 docker-compose.yml
  92. +58 −0 opentracing/config.go
  93. +58 −0 opentracing/config_test.go
  94. +46 −0 opentracing/context.go
  95. +29 −0 opentracing/context_test.go
  96. +4 −0 opentracing/doc.go
  97. +30 −0 opentracing/example_context_test.go
  98. +30 −0 opentracing/example_test.go
  99. +24 −0 opentracing/example_tracing_test.go
  100. +125 −0 opentracing/propagators.go
  101. +81 −0 opentracing/propagators_test.go
  102. +151 −0 opentracing/span.go
  103. +129 −0 opentracing/span_test.go
  104. +12 −0 opentracing/tags.go
  105. +178 −0 opentracing/tracer.go
  106. +131 −0 opentracing/tracer_test.go
  107. +1 −1 tracer/buffer.go
  108. +0 −5 tracer/contrib/README.md
  109. +0 −86 tracer/contrib/elastictraced/elastictraced.go
  110. +0 −193 tracer/contrib/elastictraced/elastictraced_test.go
  111. +0 −57 tracer/contrib/elastictraced/example_test.go
  112. +0 −26 tracer/contrib/elastictraced/quantize.go
  113. +0 −43 tracer/contrib/elastictraced/quantize_test.go
  114. +0 −59 tracer/contrib/gin-gonic/gintrace/example_test.go
  115. +0 −143 tracer/contrib/gin-gonic/gintrace/gintrace.go
  116. +0 −250 tracer/contrib/gin-gonic/gintrace/gintrace_test.go
  117. +0 −81 tracer/contrib/go-redis/example_test.go
  118. +0 −151 tracer/contrib/go-redis/tracedredis.go
  119. +0 −228 tracer/contrib/go-redis/tracedredis_test.go
  120. +0 −27 tracer/contrib/gocql/example_test.go
  121. +0 −146 tracer/contrib/gocql/gocqltrace.go
  122. +0 −132 tracer/contrib/gocql/gocqltrace_test.go
  123. +0 −31 tracer/contrib/gorilla/muxtrace/example_test.go
  124. +0 −127 tracer/contrib/gorilla/muxtrace/muxtrace.go
  125. +0 −206 tracer/contrib/gorilla/muxtrace/muxtrace_test.go
  126. +0 −59 tracer/contrib/redigo/example_test.go
  127. +0 −131 tracer/contrib/redigo/redigotrace.go
  128. +0 −214 tracer/contrib/redigo/redigotrace_test.go
  129. +0 −169 tracer/contrib/sqltraced/example_test.go
  130. +0 −41 tracer/contrib/sqltraced/mysql_test.go
  131. +0 −42 tracer/contrib/sqltraced/parse.go
  132. +0 −44 tracer/contrib/sqltraced/parse_test.go
  133. +0 −25 tracer/contrib/sqltraced/parsedsn/mysql/collations.go
  134. +0 −148 tracer/contrib/sqltraced/parsedsn/mysql/dsn.go
  135. +0 −3 tracer/contrib/sqltraced/parsedsn/mysql/mysql.go
  136. +0 −23 tracer/contrib/sqltraced/parsedsn/mysql/utils.go
  137. +0 −47 tracer/contrib/sqltraced/parsedsn/parsedsn.go
  138. +0 −49 tracer/contrib/sqltraced/parsedsn/parsedsn_test.go
  139. +0 −2 tracer/contrib/sqltraced/parsedsn/pq/pq.go
  140. +0 −76 tracer/contrib/sqltraced/parsedsn/pq/url.go
  141. +0 −41 tracer/contrib/sqltraced/pq_test.go
  142. +0 −211 tracer/contrib/sqltraced/sqltest/sqltest.go
  143. +0 −384 tracer/contrib/sqltraced/sqltraced.go
  144. +0 −2 tracer/contrib/sqltraced/sqlutils/sqlutils.go
  145. +0 −59 tracer/contrib/sqltraced/sqlutils/utils.go
  146. +0 −17 tracer/contrib/sqltraced/sqlutils/utils_test.go
  147. +0 −36 tracer/contrib/sqltraced/utils.go
  148. +0 −29 tracer/contrib/sqltraced/utils_test.go
  149. +0 −23 tracer/contrib/sqlxtraced/example_test.go
  150. +0 −41 tracer/contrib/sqlxtraced/mysql_test.go
  151. +0 −41 tracer/contrib/sqlxtraced/pq_test.go
  152. +0 −35 tracer/contrib/sqlxtraced/sqlxtraced.go
  153. +13 −79 tracer/encoder.go
  154. +0 −45 tracer/encoder_test.go
  155. +19 −0 tracer/ext/priority.go
  156. +1 −1 tracer/ext/tracer.go
  157. +30 −1 tracer/span.go
  158. +48 −2 tracer/span_test.go
  159. +0 −38 tracer/test/config.go
  160. +28 −15 tracer/tracer.go
  161. +6 −9 tracer/tracer_test.go
  162. +1 −1 tracer/tracertest/tracertest.go
  163. +33 −46 tracer/transport.go
  164. +3 −14 tracer/transport_test.go
  165. +0 −15 wait-for-services.sh
85 changes: 85 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
version: 2
jobs:
build:
working_directory: /go/src/github.com/DataDog/dd-trace-go
resource_class: xlarge

docker:
- image: circleci/golang:latest
- image: cassandra:3.7
- image: circleci/mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_PASSWORD=test
- MYSQL_USER=test
- MYSQL_DATABASE=test
- image: circleci/postgres:9.5
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- image: redis:3.2
- image: elasticsearch:2
environment:
- ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
- image: elasticsearch:5
environment:
- ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
- image: datadog/docker-dd-agent
environment:
- DD_APM_ENABLED=true
- DD_BIND_HOST=0.0.0.0
- DD_API_KEY=invalid_key_but_this_is_fine

steps:
- checkout

- run:
name: Vendor gRPC v1.5.2
# This step vendors gRPC v1.5.2 inside our gRPC.v12 contrib
# to allow running the tests against the correct version of
# the gRPC library. In a real-world use case we don't want
# this vendoring to exist because users might be running the
# integration against older versions which we should also
# support.
environment:
GRPC_DEST: contrib/google.golang.org/grpc.v12/vendor/google.golang.org/grpc
command: |
mkdir -p $GRPC_DEST
git clone --branch v1.5.2 https://github.com/grpc/grpc-go $GRPC_DEST
- run:
name: Fetching dependencies
command: go get -t ./...

- run:
name: Wait for MySQL
command: dockerize -wait tcp://localhost:3306 -timeout 1m

- run:
name: Wait for Postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m

- run:
name: Wait for Redis
command: dockerize -wait tcp://localhost:6379 -timeout 1m

- run:
name: Wait for ElasticSearch (1)
command: dockerize -wait http://localhost:9200 -timeout 1m

- run:
name: Wait for ElasticSearch (2)
command: dockerize -wait http://localhost:9201 -timeout 1m

- run:
name: Wait for Datadog Agent
command: dockerize -wait tcp://127.0.0.1:8126 -timeout 1m

- run:
name: Wait for Cassandra
command: dockerize -wait tcp://localhost:9042 -timeout 2m

- run:
name: Testing
command: go test -race ./...
13 changes: 0 additions & 13 deletions .env

This file was deleted.

29 changes: 29 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file is used only to track tracer dependencies. It's not meant to be used
# by end users so no integrations dependencies must be added here. If you update
# or add a new dependency, remember to commit the `vendor` folder.

# ignore integrations dependencies
ignored = [
"github.com/julienschmidt/*",
"github.com/opentracing/*",
"github.com/cihub/seelog",
"github.com/gin-gonic/gin",
"github.com/go-redis/redis",
"github.com/go-sql-driver/mysql",
"github.com/gocql/gocql",
"github.com/gorilla/mux",
"github.com/jmoiron/sqlx",
"github.com/lib/pq",
"google.golang.org/grpc",
"gopkg.in/olivere/elastic.v3",
"gopkg.in/olivere/elastic.v5",
"github.com/stretchr/*",
"github.com/garyburd/*",
"github.com/golang/*",
"google.golang.org/*",
"golang.org/x/*",
]

[[constraint]]
name = "github.com/ugorji/go"
revision = "9c7f9b7a2bc3a520f7c7b30b34b7f85f47fe27b6"
2 changes: 2 additions & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Component,Origin,License,Copyright
import,io.opentracing,Apache-2.0,Copyright 2016-2017 The OpenTracing Authors
63 changes: 55 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,62 @@
# dd-trace-go
### :warning: WARNING! This branch is no longer maintained. Development is now on the [`v1` branch](https://github.com/DataDog/dd-trace-go/tree/v1). Please consider upgrading using our [migration guide](https://github.com/DataDog/dd-trace-go/blob/v1/MIGRATING.md).

---

[![CircleCI](https://circleci.com/gh/DataDog/dd-trace-go/tree/master.svg?style=svg)](https://circleci.com/gh/DataDog/dd-trace-go/tree/master)
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/DataDog/dd-trace-go/tracer)
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/DataDog/dd-trace-go/opentracing)

Datadog APM client that implements an [OpenTracing](http://opentracing.io) Tracer.

## Initialization

To start using the Datadog Tracer with the OpenTracing API, you should first initialize the tracer with a proper `Configuration` object:

```go
import (
// ddtrace namespace is suggested
ddtrace "github.com/DataDog/dd-trace-go/opentracing"
opentracing "github.com/opentracing/opentracing-go"
)

func main() {
// create a Tracer configuration
config := ddtrace.NewConfiguration()
config.ServiceName = "api-intake"
config.AgentHostname = "ddagent.consul.local"

// initialize a Tracer and ensure a graceful shutdown
// using the `closer.Close()`
tracer, closer, err := ddtrace.NewTracer(config)
if err != nil {
// handle the configuration error
}
defer closer.Close()

// set the Datadog tracer as a GlobalTracer
opentracing.SetGlobalTracer(tracer)
startWebServer()
}
```

Function `NewTracer(config)` returns an `io.Closer` instance that can be used to gracefully shutdown the `tracer`. It's recommended to always call the `closer.Close()`, otherwise internal buffers are not flushed and you may lose some traces.

## Usage

See [Opentracing documentation](https://github.com/opentracing/opentracing-go) for some usage patterns. Legacy documentation is available in [GoDoc format](https://godoc.org/github.com/DataDog/dd-trace-go/tracer).

## Contributing Quick Start

Requirements:

The Datadog go tracing package. Currently requires at least Go 1.7.
* Go 1.7 or later
* Docker

Sample code: https://godoc.org/github.com/DataDog/dd-trace-go/tracer#pkg-examples
List of integrations: https://godoc.org/github.com/DataDog/dd-trace-go/tracer#pkg-subdirectories
### Run the tests

## Directory structure
The best way to run the tests is using the [CircleCI CLI](https://circleci.com/docs/2.0/local-jobs/). Simply run `circleci build`
in the repository root. Note that you might have to increase the resources dedicated to Docker to around 4GB.

- [tracer](https://github.com/DataDog/dd-trace-go/tree/master/tracer): contains the low level API used to trace the different libraries.
## Further Reading

- [libs](https://github.com/DataDog/dd-trace-go/tree/master/libs): contains the different libraries supported by our APM solution.
Automatically traced libraries and frameworks: https://godoc.org/github.com/DataDog/dd-trace-go/tracer#pkg-subdirectories
Sample code: https://godoc.org/github.com/DataDog/dd-trace-go/tracer#pkg-examples
120 changes: 0 additions & 120 deletions Rakefile

This file was deleted.

39 changes: 0 additions & 39 deletions circle.yml

This file was deleted.

Loading