Skip to content

Commit 57b8d05

Browse files
Merge pull request #98 from ExpediaDotCom/refactor
restructuring of the client repository and documentation update
2 parents 9a05d03 + d13aeb8 commit 57b8d05

File tree

36 files changed

+259
-401
lines changed

36 files changed

+259
-401
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing
2+
3+
Code contributions are always welcome!
4+
5+
* Open an issue in the repo with defect/enhancements
6+
* We can also be reached @ https://gitter.im/expedia-haystack/Lobby
7+
* Fork, make the changes, build and test it locally
8+
* Issue a PR - watch the PR build in [travis-ci](https://travis-ci.org/ExpediaDotCom/haystack-client-java)
9+
* Once merged to master, travis-ci will build and release the artifact with the current snapshot version
10+
11+
12+
## Building the code
13+
14+
### Prerequisites
15+
16+
* Make sure you have Java 1.8
17+
18+
### Building
19+
20+
For a full build, including unit tests you can run the following
21+
22+
```
23+
./mvnw clean package
24+
```
25+
26+
## Releasing the current changes
27+
28+
Latest releases of this library are available in [Maven central](https://mvnrepository.com/search?q=Haystack&d=com.expedia)
29+
30+
1. Get All your changes reviewed and merged into master
31+
2. Test the latest snapshot build in [SonaType Snapshots Repository](https://oss.sonatype.org/#nexus-search;quick~haystack-client-java) to ensure the artifact contains all your changes and they work as expected
32+
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
33+
4. This will cause the build to run for the new tagged version. This will cause the jar files to be released to the
34+
[SonaType Release Repository](https://oss.sonatype.org/#nexus-search;quick~haystack-client-java).
35+
5. Now, update the POM version to next snapshot version for development
36+
6. Create another pull request with the change from step 5 and get it merged.
37+
38+

README.md

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,61 @@
22
[![codecov](https://codecov.io/gh/ExpediaDotCom/haystack-client-java/branch/master/graph/badge.svg)](https://codecov.io/gh/ExpediaDotCom/haystack-client-java)
33
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/ExpediaDotCom/haystack/blob/master/LICENSE)
44

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)
68

7-
Haystack bindings for the OpenTracing API. Clients use this library to send trace data to a Haystack server.
89

910
Opentracing API usage has been documented at [https://github.com/opentracing/opentracing-java](https://github.com/opentracing/opentracing-java).
1011

11-
`haystack-client-core` library provides an implementation of `io.opentracing.Tracer` that sends spans to `Haystack` server.
1212

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.
1433

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)
1834

35+
## Importing Dependencies
1936

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.
2139

22-
### Prerequisites
40+
**Please use the latest version:** [![Released Version][maven-img]][maven]
2341

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+
```
2551

26-
### Building
52+
## Integrations
2753

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
2955

30-
```
31-
./mvnw clean package
32-
```
56+
* [Opencencus](https://github.com/ExpediaDotCom/haystack-opencensus-exporter-java)
57+
* [Brave-Zipkin](https://github.com/HotelsDotCom/pitchfork)
3358

34-
### Releases
3559

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.
3762

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.

commons/pom.xml

Lines changed: 0 additions & 77 deletions
This file was deleted.

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/GRPCAgentProtoClient.java

Lines changed: 0 additions & 74 deletions
This file was deleted.

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/HttpCollectorProtoClient.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<dependencies>
1717
<dependency>
1818
<groupId>com.expedia.www</groupId>
19-
<artifactId>haystack-client-commons</artifactId>
19+
<artifactId>haystack-client-metrics-api</artifactId>
2020
<version>${project.version}</version>
2121
</dependency>
2222

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java renamed to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java

File renamed without changes.

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java renamed to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java

File renamed without changes.

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java renamed to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java

File renamed without changes.

commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java renamed to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java

File renamed without changes.

0 commit comments

Comments
 (0)