# OpenCensus Java OC-Agent Trace Exporter

The *OpenCensus Java OC-Agent Trace Exporter* is the Java implementation of the OpenCensus Agent
(OC-Agent) Trace Exporter.

## Quickstart

### Add the dependencies to your project

For Maven add to your `pom.xml`:
```xml

  
    io.opencensus
    opencensus-api
    0.17.0
  
  
    io.opencensus
    opencensus-exporter-trace-ocagent
    0.17.0
  
  
    io.opencensus
    opencensus-impl
    0.17.0
    runtime
  

```

For Gradle add to your dependencies:
```gradle
compile 'io.opencensus:opencensus-api:0.17.0'
compile 'io.opencensus:opencensus-exporter-trace-ocagent:0.17.0'
runtime 'io.opencensus:opencensus-impl:0.17.0'
```

### Register the exporter

```java
public class MyMainClass {
  public static void main(String[] args) throws Exception {
    OcAgentTraceExporter.createAndRegister();
    // ...
  }
}
```