https://github.com/expediadotcom/haystack-opencensus-exporter-java
OpenCensus Haystack Trace Exporter is an Opencensus exporter that exports data to Haystack.
https://github.com/expediadotcom/haystack-opencensus-exporter-java
distributed-tracing haystack java opencensus
Last synced: 4 months ago
JSON representation
OpenCensus Haystack Trace Exporter is an Opencensus exporter that exports data to Haystack.
- Host: GitHub
- URL: https://github.com/expediadotcom/haystack-opencensus-exporter-java
- Owner: ExpediaDotCom
- License: apache-2.0
- Created: 2019-02-09T22:30:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T05:33:19.000Z (almost 7 years ago)
- Last Synced: 2025-03-04T13:47:21.590Z (11 months ago)
- Topics: distributed-tracing, haystack, java, opencensus
- Language: Java
- Homepage: https://expediadotcom.github.io/haystack/
- Size: 77.1 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/ExpediaDotCom/haystack-opencensus-exporter)
[](https://github.com/ExpediaDotCom/haystack/blob/master/LICENSE)
# 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
io.opencensus
opencensus-api
0.17.0
com.expedia.www
opencensus-exporter-trace-haystack
[0.2.1,)
io.opencensus
opencensus-impl
0.17.0
runtime
```
For Gradle add to your dependencies:
```groovy
compile 'io.opencensus:opencensus-api:0.17.0'
compile 'com.expedia.www: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)