-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ashish Aggarwal
authored and
Ashish Aggarwal
committed
Nov 30, 2018
1 parent
92d7f5f
commit 457ed8e
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Opencensus Trace Exporter for Haystack | ||
|
||
The OpenCensus Haystack Trace Exporter is a trace exporter that exports data to haystack. | ||
|
||
To know about haystack checkout [here](https://expediadotcom.github.io/haystack/) | ||
|
||
## Quickstart | ||
|
||
#### Add the dependencies to your project | ||
For Maven add to your `pom.xml`: | ||
```xml | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.opencensus</groupId> | ||
<artifactId>opencensus-api</artifactId> | ||
<version>0.17.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.opencensus</groupId> | ||
<artifactId>opencensus-exporter-trace-haystack</artifactId> | ||
<version>[0.2.1,)</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.opencensus</groupId> | ||
<artifactId>opencensus-impl</artifactId> | ||
<version>0.17.0</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
``` | ||
|
||
For Gradle add to your dependencies: | ||
```groovy | ||
compile 'io.opencensus:opencensus-api:0.17.0' | ||
compile 'io.opencensus:opencensus-exporter-trace-haystack:0.2.1' | ||
runtime 'io.opencensus:opencensus-impl:0.17.0' | ||
``` | ||
|
||
#### Register the exporter | ||
|
||
This will export traces to the haystack: | ||
|
||
```java | ||
public class MainClass { | ||
public static void main(String[] args) throws Exception { | ||
com.www.expedia.opencensus.exporter.trace.HaystackTraceExporter.createAndRegister(new GrpcAgentDispatcherConfig("haystack-agent", 35000), "my-service"); | ||
// ... | ||
} | ||
} | ||
``` | ||
|
||
You can look into the integration test [here](src/test/scala/com/www/expedia/opencensus/exporter/trace/HaystackExporterIntegrationSpec.scala) |