Skip to content

Commit

Permalink
Merge pull request #98 from ExpediaDotCom/refactor
Browse files Browse the repository at this point in the history
restructuring of the client repository and documentation update
  • Loading branch information
mchandramouli authored Feb 26, 2019
2 parents 9a05d03 + d13aeb8 commit 57b8d05
Show file tree
Hide file tree
Showing 36 changed files with 259 additions and 401 deletions.
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing

Code contributions are always welcome!

* Open an issue in the repo with defect/enhancements
* We can also be reached @ https://gitter.im/expedia-haystack/Lobby
* Fork, make the changes, build and test it locally
* Issue a PR - watch the PR build in [travis-ci](https://travis-ci.org/ExpediaDotCom/haystack-client-java)
* Once merged to master, travis-ci will build and release the artifact with the current snapshot version


## Building the code

### Prerequisites

* Make sure you have Java 1.8

### Building

For a full build, including unit tests you can run the following

```
./mvnw clean package
```

## Releasing the current changes

Latest releases of this library are available in [Maven central](https://mvnrepository.com/search?q=Haystack&d=com.expedia)

1. Get All your changes reviewed and merged into master
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
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
4. This will cause the build to run for the new tagged version. This will cause the jar files to be released to the
[SonaType Release Repository](https://oss.sonatype.org/#nexus-search;quick~haystack-client-java).
5. Now, update the POM version to next snapshot version for development
6. Create another pull request with the change from step 5 and get it merged.


67 changes: 42 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,61 @@
[![codecov](https://codecov.io/gh/ExpediaDotCom/haystack-client-java/branch/master/graph/badge.svg)](https://codecov.io/gh/ExpediaDotCom/haystack-client-java)
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/ExpediaDotCom/haystack/blob/master/LICENSE)

# haystack-client-java
# Haystack Client Java

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)

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

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

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

Integrations for common frameworks are available @
You can look at our sample projects for how to trace a simple web application

* [SpringBoot Example](https://github.com/ExpediaDotCom/opentracing-spring-haystack-example)
* [Dropwizard Example](https://github.com/ExpediaDotCom/haystack-dropwizard-example)

## Contributing and Developing
Please see [CONTRIBUTING.md](CONTRIBUTING.md)


## Core Modules

[haystack-client-core](./core) - library provides an implementation of `io.opentracing.Tracer` that sends spans to `Haystack` server.

## Addon Modules

[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

[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

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

* [Dropwizard](integrations/dropwizard/README.md)
* [Spring Boot and Web](integrations/opentracing-spring-haystack-web-starter/README.md)
* [Opencencus](integrations/opencensus/README.md)

## Importing Dependencies

## How to build the code
All artifacts are published to Maven Central. Snapshot artifacts are also published to [Sonatype][sonatype].
Follow these [instructions][sonatype-snapshot-instructions] to add the snapshot repository to your build system.

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

* Make sure you have Java 1.8
In the usual case, you just need to include the following dependency to your project:
```xml
<dependency>
<groupId>com.expedia.www</groupId>
<artifactId>haystack-client-java-core</artifactId>
<version>$latestClientVersion</version>
<type>pom</type>
</dependency>
```

### Building
## Integrations

For a full build, including unit tests you can run the following
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

```
./mvnw clean package
```
* [Opencencus](https://github.com/ExpediaDotCom/haystack-opencensus-exporter-java)
* [Brave-Zipkin](https://github.com/HotelsDotCom/pitchfork)

### Releases

Latest releases of this library are available in [Maven central](https://mvnrepository.com/search?q=Haystack&d=com.expedia)
## License
This project is licensed under the Apache License v2.0 - see the LICENSE.txt file for details.

1. Create a pull request with your changes.
2. Ask for a review of the pull request; when it is approved, the Travis CI build will upload the resulting SNAPSHOT jar file
to the [SonaType Staging Repository](https://oss.sonatype.org/#stagingRepositories)
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
4. This will cause the build to run for the new tagged version. This will cause the jar files to be released to the
[SonaType Release Repository](https://oss.sonatype.org/#nexus-search;quick~haystack-client-java).
5. Now, update the POM version to next snapshot version for development
6. Create another pull request with the change from step 5 and get it merged.
77 changes: 0 additions & 77 deletions commons/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>com.expedia.www</groupId>
<artifactId>haystack-client-commons</artifactId>
<artifactId>haystack-client-metrics-api</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
66 changes: 0 additions & 66 deletions integrations/dropwizard-metrics/pom.xml

This file was deleted.

Loading

0 comments on commit 57b8d05

Please sign in to comment.