tree: fa581824e5d08ef804648b428d67c2b185d960ac
  1. src/
  2. build.gradle
  3. README.md
exporters/trace/datadog/README.md

OpenCensus Datadog Trace Exporter

Build Status Windows Build Status Maven Central

The OpenCensus Datadog Trace Exporter is a trace exporter that exports data to Datadog.

Quickstart

Prerequisites

Datadog 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.

Hello Datadog

Add the dependencies to your project

For Maven add to your pom.xml:

<dependencies>
  <dependency>
    <groupId>io.opencensus</groupId>
    <artifactId>opencensus-api</artifactId>
    <version>0.28.3</version>
  </dependency>
  <dependency>
    <groupId>io.opencensus</groupId>
    <artifactId>opencensus-exporter-trace-datadog</artifactId>
    <version>0.28.3</version>
  </dependency>
  <dependency>
    <groupId>io.opencensus</groupId>
    <artifactId>opencensus-impl</artifactId>
    <version>0.28.3</version>
    <scope>runtime</scope>
  </dependency>
</dependencies>

For Gradle add to your dependencies:

compile 'io.opencensus:opencensus-api:0.28.3'
compile 'io.opencensus:opencensus-exporter-trace-datadog:0.28.3'
runtime 'io.opencensus:opencensus-impl:0.28.3'

Register the exporter

public class MyMainClass {
  public static void main(String[] args) throws Exception {

    DatadogTraceConfiguration config = DatadogTraceConfiguration.builder()
      .setAgentEndpoint("http://localhost:8126/v0.3/traces")
      .setService("myService")
      .setType("web")
      .build();
    DatadogTraceExporter.createAndRegister(config);
    // ...
  }
}

Java Versions

Java 8 or above is required for using this exporter.