Name Date Size #Lines LOC

..--

src/H25-Apr-2025-655380

README.mdH A D25-Apr-20252.4 KiB7459

build.gradleH A D25-Apr-2025462 1914

README.md

1# OpenCensus Datadog Trace Exporter
2[![Build Status][travis-image]][travis-url]
3[![Windows Build Status][appveyor-image]][appveyor-url]
4[![Maven Central][maven-image]][maven-url]
5
6The *OpenCensus Datadog Trace Exporter* is a trace exporter that exports data to [Datadog](https://www.datadoghq.com/).
7
8## Quickstart
9
10### Prerequisites
11
12Datadog collects traces using a local agent, which forwards them to the Datadog automatic tracing. Instructions for setting up the agent can be found [in the Datadog docs](https://docs.datadoghq.com/agent/?tab=agentv6).
13
14### Hello Datadog
15
16#### Add the dependencies to your project
17
18For Maven add to your `pom.xml`:
19```xml
20<dependencies>
21  <dependency>
22    <groupId>io.opencensus</groupId>
23    <artifactId>opencensus-api</artifactId>
24    <version>0.28.3</version>
25  </dependency>
26  <dependency>
27    <groupId>io.opencensus</groupId>
28    <artifactId>opencensus-exporter-trace-datadog</artifactId>
29    <version>0.28.3</version>
30  </dependency>
31  <dependency>
32    <groupId>io.opencensus</groupId>
33    <artifactId>opencensus-impl</artifactId>
34    <version>0.28.3</version>
35    <scope>runtime</scope>
36  </dependency>
37</dependencies>
38```
39
40For Gradle add to your dependencies:
41```groovy
42compile 'io.opencensus:opencensus-api:0.28.3'
43compile 'io.opencensus:opencensus-exporter-trace-datadog:0.28.3'
44runtime 'io.opencensus:opencensus-impl:0.28.3'
45```
46
47#### Register the exporter
48
49```java
50public class MyMainClass {
51  public static void main(String[] args) throws Exception {
52
53    DatadogTraceConfiguration config = DatadogTraceConfiguration.builder()
54      .setAgentEndpoint("http://localhost:8126/v0.3/traces")
55      .setService("myService")
56      .setType("web")
57      .build();
58    DatadogTraceExporter.createAndRegister(config);
59    // ...
60  }
61}
62```
63
64#### Java Versions
65
66Java 8 or above is required for using this exporter.
67
68[travis-image]: https://travis-ci.org/census-instrumentation/opencensus-java.svg?branch=master
69[travis-url]: https://travis-ci.org/census-instrumentation/opencensus-java
70[appveyor-image]: https://ci.appveyor.com/api/projects/status/hxthmpkxar4jq4be/branch/master?svg=true
71[appveyor-url]: https://ci.appveyor.com/project/opencensusjavateam/opencensus-java/branch/master
72[maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-exporter-trace-datadog/badge.svg
73[maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-exporter-trace-datadog
74