Skip to content

Commit 457ed8e

Browse files
Ashish AggarwalAshish Aggarwal
authored andcommitted
adding README
1 parent 92d7f5f commit 457ed8e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

integrations/opencensus/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Opencensus Trace Exporter for Haystack
2+
3+
The OpenCensus Haystack Trace Exporter is a trace exporter that exports data to haystack.
4+
5+
To know about haystack checkout [here](https://expediadotcom.github.io/haystack/)
6+
7+
## Quickstart
8+
9+
#### Add the dependencies to your project
10+
For Maven add to your `pom.xml`:
11+
```xml
12+
<dependencies>
13+
<dependency>
14+
<groupId>io.opencensus</groupId>
15+
<artifactId>opencensus-api</artifactId>
16+
<version>0.17.0</version>
17+
</dependency>
18+
<dependency>
19+
<groupId>io.opencensus</groupId>
20+
<artifactId>opencensus-exporter-trace-haystack</artifactId>
21+
<version>[0.2.1,)</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>io.opencensus</groupId>
25+
<artifactId>opencensus-impl</artifactId>
26+
<version>0.17.0</version>
27+
<scope>runtime</scope>
28+
</dependency>
29+
</dependencies>
30+
```
31+
32+
For Gradle add to your dependencies:
33+
```groovy
34+
compile 'io.opencensus:opencensus-api:0.17.0'
35+
compile 'io.opencensus:opencensus-exporter-trace-haystack:0.2.1'
36+
runtime 'io.opencensus:opencensus-impl:0.17.0'
37+
```
38+
39+
#### Register the exporter
40+
41+
This will export traces to the haystack:
42+
43+
```java
44+
public class MainClass {
45+
public static void main(String[] args) throws Exception {
46+
com.www.expedia.opencensus.exporter.trace.HaystackTraceExporter.createAndRegister(new GrpcAgentDispatcherConfig("haystack-agent", 35000), "my-service");
47+
// ...
48+
}
49+
}
50+
```
51+
52+
You can look into the integration test [here](src/test/scala/com/www/expedia/opencensus/exporter/trace/HaystackExporterIntegrationSpec.scala)

0 commit comments

Comments
 (0)