Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
build.gradle | 22-Oct-2020 | 1.1K | |
README.md | 22-Oct-2020 | 3.3K | |
src/ | 22-Oct-2020 |
1 # OpenCensus Jaeger Trace Exporter 2 [![Build Status][travis-image]][travis-url] 3 [![Windows Build Status][appveyor-image]][appveyor-url] 4 [![Maven Central][maven-image]][maven-url] 5 6 The *OpenCensus Jaeger Trace Exporter* is a trace exporter that exports 7 data to Jaeger. 8 9 [Jaeger](https://jaeger.readthedocs.io/en/latest/), inspired by [Dapper](https://research.google.com/pubs/pub36356.html) and [OpenZipkin](http://zipkin.io/), is a distributed tracing system released as open source by [Uber Technologies](http://uber.github.io/). It is used for monitoring and troubleshooting microservices-based distributed systems, including: 10 11 - Distributed context propagation 12 - Distributed transaction monitoring 13 - Root cause analysis 14 - Service dependency analysis 15 - Performance / latency optimization 16 17 ## Quickstart 18 19 ### Prerequisites 20 21 [Jaeger](https://jaeger.readthedocs.io/en/latest/) stores and queries traces exported by 22 applications instrumented with Census. The easiest way to [start a Jaeger 23 server](https://jaeger.readthedocs.io/en/latest/getting_started/) is to paste the below: 24 25 ```bash 26 docker run -d \ 27 -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ 28 -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp \ 29 -p5778:5778 -p16686:16686 -p14268:14268 -p9411:9411 \ 30 jaegertracing/all-in-one:latest 31 ``` 32 33 ### Hello Jaeger 34 35 #### Add the dependencies to your project 36 37 For Maven add to your `pom.xml`: 38 ```xml 39 <dependencies> 40 <dependency> 41 <groupId>io.opencensus</groupId> 42 <artifactId>opencensus-api</artifactId> 43 <version>0.16.1</version> 44 </dependency> 45 <dependency> 46 <groupId>io.opencensus</groupId> 47 <artifactId>opencensus-exporter-trace-jaeger</artifactId> 48 <version>0.16.1</version> 49 </dependency> 50 <dependency> 51 <groupId>io.opencensus</groupId> 52 <artifactId>opencensus-impl</artifactId> 53 <version>0.16.1</version> 54 <scope>runtime</scope> 55 </dependency> 56 </dependencies> 57 ``` 58 59 For Gradle add to your dependencies: 60 ```groovy 61 compile 'io.opencensus:opencensus-api:0.16.1' 62 compile 'io.opencensus:opencensus-exporter-trace-jaeger:0.16.1' 63 runtime 'io.opencensus:opencensus-impl:0.16.1' 64 ``` 65 66 #### Register the exporter 67 68 This will export traces to the Jaeger thrift format to the Jaeger instance started previously: 69 70 ```java 71 public class MyMainClass { 72 public static void main(String[] args) throws Exception { 73 JaegerTraceExporter.createAndRegister("http://127.0.0.1:14268/api/traces", "my-service"); 74 // ... 75 } 76 } 77 ``` 78 79 See also [this integration test](https://github.com/census-instrumentation/opencensus-java/blob/master/exporters/trace/jaeger/src/test/java/io/opencensus/exporter/trace/jaeger/JaegerExporterHandlerIntegrationTest.java). 80 81 #### Java Versions 82 83 Java 6 or above is required for using this exporter. 84 85 [travis-image]: https://travis-ci.org/census-instrumentation/opencensus-java.svg?branch=master 86 [travis-url]: https://travis-ci.org/census-instrumentation/opencensus-java 87 [appveyor-image]: https://ci.appveyor.com/api/projects/status/hxthmpkxar4jq4be/branch/master?svg=true 88 [appveyor-url]: https://ci.appveyor.com/project/opencensusjavateam/opencensus-java/branch/master 89 [maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-exporter-trace-jaeger/badge.svg 90 [maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-exporter-trace-jaeger 91