diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e484abd --- /dev/null +++ b/CONTRIBUTING.md @@ -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. + + diff --git a/README.md b/README.md index 6b6abfd..bef1611 100644 --- a/README.md +++ b/README.md @@ -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 + + com.expedia.www + haystack-client-java-core + $latestClientVersion + pom + +``` -### 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. diff --git a/commons/pom.xml b/commons/pom.xml deleted file mode 100644 index ec597ad..0000000 --- a/commons/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - 4.0.0 - - - com.expedia.www - haystack-client-java-parent - 0.2.6-SNAPSHOT - - - haystack-client-commons - jar - haystack-client-commons - - - - com.expedia.www - haystack-commons - - - - io.grpc - grpc-netty-shaded - - - - io.grpc - grpc-protobuf - - - - io.grpc - grpc-stub - - - - org.apache.commons - commons-lang3 - - - - org.slf4j - slf4j-api - - - - org.apache.httpcomponents - httpclient - - - - - junit - junit - test - - - - org.mockito - mockito-core - test - - - - io.grpc - grpc-testing - test - - - - org.awaitility - awaitility - test - - - - diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/GRPCAgentProtoClient.java b/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/GRPCAgentProtoClient.java deleted file mode 100644 index 3dea2e3..0000000 --- a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/GRPCAgentProtoClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2018 Expedia, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.expedia.www.haystack.client.dispatchers.clients; - -import com.expedia.open.tracing.Span; -import com.expedia.open.tracing.agent.api.DispatchResult; -import com.expedia.open.tracing.agent.api.SpanAgentGrpc; -import com.expedia.open.tracing.agent.api.SpanAgentGrpc.SpanAgentStub; -import com.expedia.www.haystack.client.metrics.Metrics; -import com.expedia.www.haystack.client.metrics.MetricsRegistry; -import com.expedia.www.haystack.client.metrics.Timer.Sample; -import io.grpc.ManagedChannel; -import io.grpc.stub.StreamObserver; - -public class GRPCAgentProtoClient extends BaseGrpcClient { - public GRPCAgentProtoClient(Metrics metrics, - ManagedChannel channel, - SpanAgentStub stub, - StreamObserver observer, - long shutdownTimeoutMS) { - super(metrics, channel, stub, observer, shutdownTimeoutMS); - } - - @Override - public boolean send(Span span) throws ClientException { - try (Sample timer = sendTimer.start()) { - stub.dispatch(span, observer); - } catch (Exception e) { - sendExceptionCounter.increment(); - throw new ClientException(e.getMessage(), e); - } - // always true - return true; - } - - public static final class Builder extends BaseGrpcClient.Builder { - public Builder(MetricsRegistry metrics, ManagedChannel channel) { - super(metrics, channel); - } - - public Builder(Metrics metrics, String host, int port) { - super(metrics, host, port); - } - - public Builder(MetricsRegistry metrics, String host, int port) { - super(metrics, host, port); - } - - public GRPCAgentProtoClient build() { - ManagedChannel managedChannel = this.channel; - - if (managedChannel == null) { - managedChannel = buildManagedChannel(); - } - - SpanAgentStub stub = SpanAgentGrpc.newStub(managedChannel); - return new GRPCAgentProtoClient(metrics, managedChannel, stub, observer, shutdownTimeoutMS); - } - } -} diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/HttpCollectorProtoClient.java b/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/HttpCollectorProtoClient.java deleted file mode 100644 index 5e7ed94..0000000 --- a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/HttpCollectorProtoClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2018 Expedia, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.expedia.www.haystack.client.dispatchers.clients; - -import com.expedia.open.tracing.Span; -import org.apache.http.impl.client.CloseableHttpClient; - -import java.util.Map; - -public class HttpCollectorProtoClient extends BaseHttpClient implements Client{ - public HttpCollectorProtoClient(String endpoint, Map headers) { - super(endpoint, headers); - } - - public HttpCollectorProtoClient(String endpoint) { - super(endpoint); - } - - public HttpCollectorProtoClient(String endpoint, Map headers, CloseableHttpClient httpClient) { - super(endpoint, headers, httpClient); - } - - @Override - public boolean send(Span span) throws ClientException { - return super.send(span.toByteArray()); - } -} diff --git a/core/pom.xml b/core/pom.xml index 3b86207..dd1ebbd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -16,7 +16,7 @@ com.expedia.www - haystack-client-commons + haystack-client-metrics-api ${project.version} diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java b/core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java rename to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseGrpcClient.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java b/core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java rename to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/BaseHttpClient.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java b/core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java rename to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/Client.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java b/core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java rename to core/src/main/java/com/expedia/www/haystack/client/dispatchers/clients/ClientException.java diff --git a/integrations/dropwizard-metrics/pom.xml b/integrations/dropwizard-metrics/pom.xml deleted file mode 100644 index 289568a..0000000 --- a/integrations/dropwizard-metrics/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - - com.expedia.www - haystack-client-java-integrations - 0.2.6-SNAPSHOT - - - haystack-client-dropwizard-metrics - jar - haystack-client-dropwizard-metrics - Dropwizard metrics for the haystack library - - - - com.expedia.www - haystack-client-core - ${project.version} - - - - io.dropwizard.metrics - metrics-core - provided - - - - org.slf4j - slf4j-api - - - - - junit - junit - test - - - - org.mockito - mockito-core - test - - - - io.opentracing - opentracing-mock - test - - - - io.opentracing - opentracing-noop - test - - - - org.awaitility - awaitility - test - - - - diff --git a/integrations/micrometer/pom.xml b/integrations/micrometer/pom.xml deleted file mode 100644 index 14f465e..0000000 --- a/integrations/micrometer/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - - com.expedia.www - haystack-client-java-integrations - 0.2.6-SNAPSHOT - - - haystack-client-micrometer - jar - haystack-client-micrometer - Micrometer metrics for the haystack library - - - - com.expedia.www - haystack-client-core - ${project.version} - - - - io.micrometer - micrometer-core - true - - - - org.slf4j - slf4j-api - - - - - junit - junit - test - - - - org.mockito - mockito-core - test - - - - io.opentracing - opentracing-mock - test - - - - io.opentracing - opentracing-noop - test - - - - org.awaitility - awaitility - test - - - - diff --git a/integrations/pom.xml b/integrations/pom.xml deleted file mode 100644 index af39ac4..0000000 --- a/integrations/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - - com.expedia.www - haystack-client-java-parent - 0.2.6-SNAPSHOT - - - haystack-client-java-integrations - pom - - Client integrations for Haystack. - - - 1.2.2 - 4.0.2 - - - - - - io.dropwizard - dropwizard-bom - ${dropwizard.version} - pom - - - - io.dropwizard.metrics - metrics-core - ${dropwizard-metrics.version} - - - - - - - dropwizard-metrics - micrometer - - diff --git a/metrics/api/pom.xml b/metrics/api/pom.xml new file mode 100644 index 0000000..cf7c712 --- /dev/null +++ b/metrics/api/pom.xml @@ -0,0 +1,17 @@ + + + + haystack-client-metrics + com.expedia.www + 0.2.6-SNAPSHOT + + 4.0.0 + + haystack-client-metrics-api + jar + haystack-client-dropwizard-api + Metrics api consumed by the haystack client library to generate performance metrics for the client integration code + + \ No newline at end of file diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Counter.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Counter.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/Counter.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Counter.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Gauge.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Gauge.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/Gauge.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Gauge.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Metrics.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Metrics.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/Metrics.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Metrics.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/MetricsRegistry.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/MetricsRegistry.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/MetricsRegistry.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/MetricsRegistry.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/NoopMetricsRegistry.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/NoopMetricsRegistry.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/NoopMetricsRegistry.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/NoopMetricsRegistry.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Tag.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Tag.java similarity index 100% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/Tag.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Tag.java diff --git a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java similarity index 92% rename from commons/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java rename to metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java index d1b9fda..6293c90 100644 --- a/commons/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java +++ b/metrics/api/src/main/java/com/expedia/www/haystack/client/metrics/Timer.java @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit; public interface Timer { - public static Builder builder(String name) { + static Builder builder(String name) { return new Builder(name); } @@ -29,7 +29,7 @@ public static Builder builder(String name) { * Updates the statistics kept by the counter with the specified * amount in nanoseconds. * - * @param amount Duration of a single event being measured by this timer. + * @param duration Duration of a single event being measured by this timer. */ default void record(long duration) { record(duration, TimeUnit.NANOSECONDS); @@ -38,7 +38,7 @@ default void record(long duration) { /** * Updates the statistics kept by the counter with the specified amount. * - * @param amount Duration of a single event being measured by this timer. + * @param duration Duration of a single event being measured by this timer. * @param unit Time unit for the amount being recorded. */ void record(long duration, TimeUnit unit); diff --git a/metrics/dropwizard-metrics/pom.xml b/metrics/dropwizard-metrics/pom.xml new file mode 100644 index 0000000..aba9498 --- /dev/null +++ b/metrics/dropwizard-metrics/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + + + com.expedia.www + haystack-client-metrics + 0.2.6-SNAPSHOT + + + haystack-client-metrics-dropwizard + jar + haystack-client-metrics-dropwizard + Dropwizard metrics for the haystack library + + + 4.0.2 + + + + com.expedia.www + haystack-client-metrics-api + ${project.version} + + + + io.dropwizard.metrics + metrics-core + ${dropwizard-metrics.version} + provided + + + + org.slf4j + slf4j-api + + + + + junit + junit + test + + + + org.mockito + mockito-core + test + + + + io.opentracing + opentracing-mock + test + + + + io.opentracing + opentracing-noop + test + + + + org.awaitility + awaitility + test + + + + diff --git a/integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardCounter.java b/metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardCounter.java similarity index 100% rename from integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardCounter.java rename to metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardCounter.java diff --git a/integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardGauge.java b/metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardGauge.java similarity index 100% rename from integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardGauge.java rename to metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardGauge.java diff --git a/integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardMetricsRegistry.java b/metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardMetricsRegistry.java similarity index 100% rename from integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardMetricsRegistry.java rename to metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardMetricsRegistry.java diff --git a/integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardTimer.java b/metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardTimer.java similarity index 100% rename from integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardTimer.java rename to metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/DropwizardTimer.java diff --git a/integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/NameMapper.java b/metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/NameMapper.java similarity index 100% rename from integrations/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/NameMapper.java rename to metrics/dropwizard-metrics/src/main/java/com/expedia/www/haystack/client/metrics/dropwizard/NameMapper.java diff --git a/metrics/micrometer/pom.xml b/metrics/micrometer/pom.xml new file mode 100644 index 0000000..2de101e --- /dev/null +++ b/metrics/micrometer/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + + com.expedia.www + haystack-client-metrics + 0.2.6-SNAPSHOT + + + haystack-client-micrometer + jar + haystack-client-metrics-micrometer + Micrometer metrics for the haystack library + + + + com.expedia.www + haystack-client-metrics-api + ${project.version} + + + + io.micrometer + micrometer-core + true + + + + org.slf4j + slf4j-api + + + + + junit + junit + test + + + + org.mockito + mockito-core + test + + + + io.opentracing + opentracing-mock + test + + + + io.opentracing + opentracing-noop + test + + + + org.awaitility + awaitility + test + + + + diff --git a/integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/GlobalMetricsRegistry.java b/metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/GlobalMetricsRegistry.java similarity index 100% rename from integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/GlobalMetricsRegistry.java rename to metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/GlobalMetricsRegistry.java diff --git a/integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerCounter.java b/metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerCounter.java similarity index 100% rename from integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerCounter.java rename to metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerCounter.java diff --git a/integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerGauge.java b/metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerGauge.java similarity index 100% rename from integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerGauge.java rename to metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerGauge.java diff --git a/integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistry.java b/metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistry.java similarity index 100% rename from integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistry.java rename to metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistry.java diff --git a/integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerTimer.java b/metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerTimer.java similarity index 100% rename from integrations/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerTimer.java rename to metrics/micrometer/src/main/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerTimer.java diff --git a/integrations/micrometer/src/test/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistryTest.java b/metrics/micrometer/src/test/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistryTest.java similarity index 100% rename from integrations/micrometer/src/test/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistryTest.java rename to metrics/micrometer/src/test/java/com/expedia/www/haystack/client/metrics/micrometer/MicrometerMetricsRegistryTest.java diff --git a/metrics/pom.xml b/metrics/pom.xml new file mode 100644 index 0000000..e40360c --- /dev/null +++ b/metrics/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + + api + dropwizard-metrics + micrometer + + + com.expedia.www + haystack-client-java-parent + 0.2.6-SNAPSHOT + + + haystack-client-metrics + pom + haystack-client-metrics + diff --git a/pom.xml b/pom.xml index faf8b28..c105ad0 100644 --- a/pom.xml +++ b/pom.xml @@ -34,9 +34,8 @@ - commons + metrics core - integrations