|
2 | 2 | [](https://codecov.io/gh/ExpediaDotCom/haystack-client-java) |
3 | 3 | [](https://github.com/ExpediaDotCom/haystack/blob/master/LICENSE) |
4 | 4 |
|
5 | | -# haystack-client-java |
| 5 | +# Haystack Client Java |
| 6 | + |
| 7 | +Haystack client java is an [OpenTracing](https://github.com/opentracing/opentracing-java) compatible library which is used to capture information about distributed operations and report them to [haystack](https://expediadotcom.github.io/haystack) |
6 | 8 |
|
7 | | -Haystack bindings for the OpenTracing API. Clients use this library to send trace data to a Haystack server. |
8 | 9 |
|
9 | 10 | Opentracing API usage has been documented at [https://github.com/opentracing/opentracing-java](https://github.com/opentracing/opentracing-java). |
10 | 11 |
|
11 | | -`haystack-client-core` library provides an implementation of `io.opentracing.Tracer` that sends spans to `Haystack` server. |
12 | 12 |
|
13 | | -Integrations for common frameworks are available @ |
| 13 | +You can look at our sample projects for how to trace a simple web application |
| 14 | + |
| 15 | +* [SpringBoot Example](https://github.com/ExpediaDotCom/opentracing-spring-haystack-example) |
| 16 | +* [Dropwizard Example](https://github.com/ExpediaDotCom/haystack-dropwizard-example) |
| 17 | + |
| 18 | +## Contributing and Developing |
| 19 | +Please see [CONTRIBUTING.md](CONTRIBUTING.md) |
| 20 | + |
| 21 | + |
| 22 | +## Core Modules |
| 23 | + |
| 24 | +[haystack-client-core](./core) - library provides an implementation of `io.opentracing.Tracer` that sends spans to `Haystack` server. |
| 25 | + |
| 26 | +## Addon Modules |
| 27 | + |
| 28 | +[haystack-client-metrics-micrometer](./metrics/micrometer): metrics provider backed by [micrometer](https://micrometer.io/), to report internal Haystack Client metrics to third-party backends, such as Prometheus |
| 29 | + |
| 30 | +[haystack-client-metrics-dropwizard](./metrics/dropwizard-metrics): metrics provider backed by [dropwizard-metrics](https://metrics.dropwizard.io/4.0.0/), to report internal Haystack Client metrics to third-party backends, such as Graphite |
| 31 | + |
| 32 | +[haystack-client-metrics-api](./metrics/api): metrics api consumed by haystack-client-core to report internal Haystack Client metrics. By default its bundled with a NoOp metrics dispatcher, add any of the obove dependencies to push the client metrics. |
14 | 33 |
|
15 | | -* [Dropwizard](integrations/dropwizard/README.md) |
16 | | -* [Spring Boot and Web](integrations/opentracing-spring-haystack-web-starter/README.md) |
17 | | -* [Opencencus](integrations/opencensus/README.md) |
18 | 34 |
|
| 35 | +## Importing Dependencies |
19 | 36 |
|
20 | | -## How to build the code |
| 37 | +All artifacts are published to Maven Central. Snapshot artifacts are also published to [Sonatype][sonatype]. |
| 38 | +Follow these [instructions][sonatype-snapshot-instructions] to add the snapshot repository to your build system. |
21 | 39 |
|
22 | | -### Prerequisites |
| 40 | +**Please use the latest version:** [![Released Version][maven-img]][maven] |
23 | 41 |
|
24 | | -* Make sure you have Java 1.8 |
| 42 | +In the usual case, you just need to include the following dependency to your project: |
| 43 | +```xml |
| 44 | +<dependency> |
| 45 | + <groupId>com.expedia.www</groupId> |
| 46 | + <artifactId>haystack-client-java-core</artifactId> |
| 47 | + <version>$latestClientVersion</version> |
| 48 | + <type>pom</type> |
| 49 | +</dependency> |
| 50 | +``` |
25 | 51 |
|
26 | | -### Building |
| 52 | +## Integrations |
27 | 53 |
|
28 | | -For a full build, including unit tests you can run the following |
| 54 | +In case your apps are already wired in with some kind of instrumentation library other than OpenTracing you could refer to the below links based on your usecase |
29 | 55 |
|
30 | | -``` |
31 | | -./mvnw clean package |
32 | | -``` |
| 56 | +* [Opencencus](https://github.com/ExpediaDotCom/haystack-opencensus-exporter-java) |
| 57 | +* [Brave-Zipkin](https://github.com/HotelsDotCom/pitchfork) |
33 | 58 |
|
34 | | -### Releases |
35 | 59 |
|
36 | | -Latest releases of this library are available in [Maven central](https://mvnrepository.com/search?q=Haystack&d=com.expedia) |
| 60 | +## License |
| 61 | +This project is licensed under the Apache License v2.0 - see the LICENSE.txt file for details. |
37 | 62 |
|
38 | | -1. Create a pull request with your changes. |
39 | | -2. Ask for a review of the pull request; when it is approved, the Travis CI build will upload the resulting SNAPSHOT jar file |
40 | | -to the [SonaType Staging Repository](https://oss.sonatype.org/#stagingRepositories) |
41 | | -3. Once merged to master, one can use github https://github.com/ExpediaDotCom/haystack-client-java/releases or manual tagging to the next semantic version |
42 | | -4. This will cause the build to run for the new tagged version. This will cause the jar files to be released to the |
43 | | -[SonaType Release Repository](https://oss.sonatype.org/#nexus-search;quick~haystack-client-java). |
44 | | -5. Now, update the POM version to next snapshot version for development |
45 | | -6. Create another pull request with the change from step 5 and get it merged. |
|
0 commit comments