From 366a9992a55dfb88611b2aeab224f3715ae407db Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Fri, 28 Jul 2023 15:24:19 +0300 Subject: [PATCH 1/7] Refactor to Tracing providers Signed-off-by: Dmitry Aleksandrov --- bom/pom.xml | 24 +++++------ examples/dbclient/jdbc/pom.xml | 4 +- examples/dbclient/mongodb/pom.xml | 4 +- examples/dbclient/pokemons/pom.xml | 4 +- examples/metrics/exemplar/pom.xml | 4 +- examples/nima/tracing/pom.xml | 4 +- examples/todo-app/backend/pom.xml | 4 +- examples/todo-app/frontend/pom.xml | 4 +- examples/translator-app/backend/pom.xml | 4 +- examples/translator-app/frontend/pom.xml | 4 +- examples/webserver/opentracing/pom.xml | 4 +- microprofile/telemetry/pom.xml | 4 +- .../telemetry/OpenTelemetryProducer.java | 2 +- .../telemetry/src/main/java/module-info.java | 2 +- .../telemetry/AgentDetectorTest.java | 2 +- .../tck/OpentracingJavaMockTracerBuilder.java | 2 +- .../OpentracingJavaMockTracerProvider.java | 4 +- microprofile/tracing/pom.xml | 8 ++-- .../tracing/src/main/java/module-info.java | 2 +- .../tracing/TestTracerProvider.java | 4 +- tests/integration/mp-gh-2461/pom.xml | 4 +- tests/integration/mp-gh-5328/pom.xml | 4 +- tests/integration/native-image/mp-1/pom.xml | 4 +- tests/integration/native-image/nima-1/pom.xml | 4 +- tests/integration/webclient/pom.xml | 4 +- tests/integration/zipkin-mp-2.2/pom.xml | 4 +- tracing/pom.xml | 5 +-- tracing/{ => providers}/jaeger/pom.xml | 10 ++--- .../jaeger/JaegerDataPropagationProvider.java | 6 +-- .../jaeger/JaegerTracerBuilder.java | 24 +++++------ .../jaeger/JaegerTracerProvider.java | 8 ++-- .../providers}/jaeger/package-info.java | 6 +-- .../jaeger/src/main/java/module-info.java | 13 +++--- .../helidon/reflection-config.json | 0 .../native-image.properties | 4 +- .../reflect-config.json | 0 .../resource-config.json | 0 .../providers}/jaeger/JaegerBaggageTest.java | 2 +- .../JaegerDataPropagationProviderTest.java | 4 +- .../jaeger/JaegerTracerBuilderTest.java | 2 +- .../src/test/resources/application.yaml | 0 tracing/{ => providers}/opentelemetry/pom.xml | 6 +-- .../opentelemetry/HelidonOpenTelemetry.java | 2 +- .../opentelemetry/OpenTelemetryScope.java | 4 +- .../opentelemetry/OpenTelemetrySpan.java | 2 +- .../OpenTelemetrySpanBuilder.java | 2 +- .../OpenTelemetrySpanContext.java | 2 +- .../opentelemetry/OpenTelemetryTracer.java | 2 +- .../OpenTelemetryTracerProvider.java | 4 +- .../opentelemetry/package-info.java | 6 +-- .../src/main/java/module-info.java | 10 +++-- .../opentelemetry/AgentDetectorTest.java | 2 +- .../opentracing/etc/spotbugs/exclude.xml | 4 +- tracing/{ => providers}/opentracing/pom.xml | 6 +-- .../providers}/opentracing/NoOpBuilder.java | 2 +- .../providers}/opentracing/OpenTracing.java | 6 +-- .../opentracing/OpenTracingContext.java | 4 +- .../OpenTracingProviderHelper.java | 6 +-- .../opentracing/OpenTracingScope.java | 4 +- .../opentracing/OpenTracingSpan.java | 2 +- .../opentracing/OpenTracingSpanBuilder.java | 4 +- .../opentracing/OpenTracingTracer.java | 2 +- .../opentracing/OpenTracingTracerBuilder.java | 2 +- .../OpenTracingTracerProvider.java | 6 +-- .../providers}/opentracing/package-info.java | 10 ++--- .../opentracing/spi/OpenTracingProvider.java | 6 +-- .../opentracing/spi/package-info.java | 4 +- .../src/main/java/module-info.java | 15 ++++--- tracing/providers/pom.xml | 38 ++++++++++++++++++ tracing/{ => providers}/zipkin/pom.xml | 10 ++--- .../providers}/zipkin/ZipkinScopeManager.java | 4 +- .../tracing/providers}/zipkin/ZipkinSpan.java | 4 +- .../providers}/zipkin/ZipkinSpanBuilder.java | 4 +- .../providers}/zipkin/ZipkinTracer.java | 7 ++-- .../zipkin/ZipkinTracerBuilder.java | 4 +- .../zipkin/ZipkinTracerProvider.java | 4 +- .../providers}/zipkin/package-info.java | 4 +- .../zipkin/src/main/java/module-info.java | 40 +++++++++++++++++++ .../native-image.properties | 4 +- .../zipkin/ZipkinTracerBuilderTest.java | 4 +- .../zipkin/ZipkinTracerProviderTest.java | 4 +- .../src/test/resources/application.yaml | 2 +- .../tests/it-tracing-client-zipkin/pom.xml | 4 +- .../tests/it1/OpenTraceableClientE2ETest.java | 4 +- tracing/tracer-resolver/pom.xml | 4 +- .../tracerresolver/TracerResolverBuilder.java | 2 +- .../TracerResolverProvider.java | 6 +-- .../src/main/java/module-info.java | 4 +- 88 files changed, 286 insertions(+), 198 deletions(-) rename tracing/{ => providers}/jaeger/pom.xml (93%) rename tracing/{jaeger/src/main/java/io/helidon/tracing => providers/jaeger/src/main/java/io/helidon/tracing/providers}/jaeger/JaegerDataPropagationProvider.java (93%) rename tracing/{jaeger/src/main/java/io/helidon/tracing => providers/jaeger/src/main/java/io/helidon/tracing/providers}/jaeger/JaegerTracerBuilder.java (95%) rename tracing/{jaeger/src/main/java/io/helidon/tracing => providers/jaeger/src/main/java/io/helidon/tracing/providers}/jaeger/JaegerTracerProvider.java (86%) rename tracing/{jaeger/src/main/java/io/helidon/tracing => providers/jaeger/src/main/java/io/helidon/tracing/providers}/jaeger/package-info.java (78%) rename tracing/{ => providers}/jaeger/src/main/java/module-info.java (77%) rename tracing/{ => providers}/jaeger/src/main/resources/META-INF/native-image/helidon/reflection-config.json (100%) rename tracing/{ => providers}/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties (82%) rename tracing/{ => providers}/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/reflect-config.json (100%) rename tracing/{ => providers}/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/resource-config.json (100%) rename tracing/{jaeger/src/test/java/io/helidon/tracing => providers/jaeger/src/test/java/io/helidon/tracing/providers}/jaeger/JaegerBaggageTest.java (97%) rename tracing/{jaeger/src/test/java/io/helidon/tracing => providers/jaeger/src/test/java/io/helidon/tracing/providers}/jaeger/JaegerDataPropagationProviderTest.java (94%) rename tracing/{jaeger/src/test/java/io/helidon/tracing => providers/jaeger/src/test/java/io/helidon/tracing/providers}/jaeger/JaegerTracerBuilderTest.java (99%) rename tracing/{ => providers}/jaeger/src/test/resources/application.yaml (100%) rename tracing/{ => providers}/opentelemetry/pom.xml (93%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/HelidonOpenTelemetry.java (98%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetryScope.java (91%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetrySpan.java (98%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetrySpanBuilder.java (98%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetrySpanContext.java (96%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetryTracer.java (99%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/OpenTelemetryTracerProvider.java (96%) rename tracing/{opentelemetry/src/main/java/io/helidon/tracing => providers/opentelemetry/src/main/java/io/helidon/tracing/providers}/opentelemetry/package-info.java (80%) rename tracing/{ => providers}/opentelemetry/src/main/java/module-info.java (78%) rename tracing/{opentelemetry/src/test/java/io/helidon/tracing => providers/opentelemetry/src/test/java/io/helidon/tracing/providers}/opentelemetry/AgentDetectorTest.java (97%) rename tracing/{ => providers}/opentracing/etc/spotbugs/exclude.xml (89%) rename tracing/{ => providers}/opentracing/pom.xml (94%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/NoOpBuilder.java (98%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracing.java (90%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingContext.java (91%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingProviderHelper.java (88%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingScope.java (91%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingSpan.java (98%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingSpanBuilder.java (95%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingTracer.java (99%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingTracerBuilder.java (99%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/OpenTracingTracerProvider.java (92%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/package-info.java (62%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/spi/OpenTracingProvider.java (90%) rename tracing/{opentracing/src/main/java/io/helidon/tracing => providers/opentracing/src/main/java/io/helidon/tracing/providers}/opentracing/spi/package-info.java (84%) rename tracing/{ => providers}/opentracing/src/main/java/module-info.java (68%) create mode 100644 tracing/providers/pom.xml rename tracing/{ => providers}/zipkin/pom.xml (92%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinScopeManager.java (93%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinSpan.java (96%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinSpanBuilder.java (96%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinTracer.java (93%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinTracerBuilder.java (99%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/ZipkinTracerProvider.java (97%) rename tracing/{zipkin/src/main/java/io/helidon/tracing => providers/zipkin/src/main/java/io/helidon/tracing/providers}/zipkin/package-info.java (87%) create mode 100644 tracing/providers/zipkin/src/main/java/module-info.java rename tracing/{ => providers}/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties (84%) rename tracing/{zipkin/src/test/java/io/helidon/tracing => providers/zipkin/src/test/java/io/helidon/tracing/providers}/zipkin/ZipkinTracerBuilderTest.java (98%) rename tracing/{zipkin/src/test/java/io/helidon/tracing => providers/zipkin/src/test/java/io/helidon/tracing/providers}/zipkin/ZipkinTracerProviderTest.java (98%) rename tracing/{ => providers}/zipkin/src/test/resources/application.yaml (95%) diff --git a/bom/pom.xml b/bom/pom.xml index 608b0431f3e..dfbb731c0a0 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -588,15 +588,15 @@ - io.helidon.tracing - helidon-tracing-opentracing - ${helidon.version} + io.helidon.tracing.providers + helidon-tracing-providers-opentracing + 4.0.0-SNAPSHOT - io.helidon.tracing - helidon-tracing-opentelemetry - ${helidon.version} + io.helidon.tracing.providers + helidon-tracing-providers-opentelemetry + 4.0.0-SNAPSHOT @@ -606,15 +606,15 @@ - io.helidon.tracing - helidon-tracing-zipkin - ${helidon.version} + io.helidon.tracing.providers + helidon-tracing-providers-zipkin + 4.0.0-SNAPSHOT - io.helidon.tracing - helidon-tracing-jaeger - ${helidon.version} + io.helidon.tracing.providers + helidon-tracing-providers-jaeger + 4.0.0-SNAPSHOT diff --git a/examples/dbclient/jdbc/pom.xml b/examples/dbclient/jdbc/pom.xml index ac98f940abd..3acefe58c4c 100644 --- a/examples/dbclient/jdbc/pom.xml +++ b/examples/dbclient/jdbc/pom.xml @@ -39,8 +39,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.dbclient diff --git a/examples/dbclient/mongodb/pom.xml b/examples/dbclient/mongodb/pom.xml index 81b4fd77054..e72852f4644 100644 --- a/examples/dbclient/mongodb/pom.xml +++ b/examples/dbclient/mongodb/pom.xml @@ -83,8 +83,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.config diff --git a/examples/dbclient/pokemons/pom.xml b/examples/dbclient/pokemons/pom.xml index b8ee7544eb0..83b00a01f62 100644 --- a/examples/dbclient/pokemons/pom.xml +++ b/examples/dbclient/pokemons/pom.xml @@ -40,8 +40,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.dbclient diff --git a/examples/metrics/exemplar/pom.xml b/examples/metrics/exemplar/pom.xml index 7f841f8a0e3..c7feb6d018d 100644 --- a/examples/metrics/exemplar/pom.xml +++ b/examples/metrics/exemplar/pom.xml @@ -74,8 +74,8 @@ helidon-metrics-trace-exemplar - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.config diff --git a/examples/nima/tracing/pom.xml b/examples/nima/tracing/pom.xml index abb8816f1e4..86e1d0a7632 100644 --- a/examples/nima/tracing/pom.xml +++ b/examples/nima/tracing/pom.xml @@ -55,8 +55,8 @@ helidon-nima-webclient-tracing - io.helidon.tracing - helidon-tracing-jaeger + io.helidon.tracing.providers + helidon-tracing-providers-jaeger io.helidon.config diff --git a/examples/todo-app/backend/pom.xml b/examples/todo-app/backend/pom.xml index d97a8cded1b..eefcf340e1d 100644 --- a/examples/todo-app/backend/pom.xml +++ b/examples/todo-app/backend/pom.xml @@ -88,8 +88,8 @@ helidon-microprofile-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin runtime diff --git a/examples/todo-app/frontend/pom.xml b/examples/todo-app/frontend/pom.xml index fe62f482344..15ee08c7957 100644 --- a/examples/todo-app/frontend/pom.xml +++ b/examples/todo-app/frontend/pom.xml @@ -86,8 +86,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.bundles diff --git a/examples/translator-app/backend/pom.xml b/examples/translator-app/backend/pom.xml index d4192aa7239..2c0657ca579 100644 --- a/examples/translator-app/backend/pom.xml +++ b/examples/translator-app/backend/pom.xml @@ -50,8 +50,8 @@ helidon-config - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.nima.webserver diff --git a/examples/translator-app/frontend/pom.xml b/examples/translator-app/frontend/pom.xml index 922b6db0861..167c7b7ff91 100644 --- a/examples/translator-app/frontend/pom.xml +++ b/examples/translator-app/frontend/pom.xml @@ -58,8 +58,8 @@ helidon-config - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.common diff --git a/examples/webserver/opentracing/pom.xml b/examples/webserver/opentracing/pom.xml index 85c5fdfb5fa..b2b2c9b08be 100644 --- a/examples/webserver/opentracing/pom.xml +++ b/examples/webserver/opentracing/pom.xml @@ -58,8 +58,8 @@ helidon-config - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin diff --git a/microprofile/telemetry/pom.xml b/microprofile/telemetry/pom.xml index 800c5236987..72066486759 100644 --- a/microprofile/telemetry/pom.xml +++ b/microprofile/telemetry/pom.xml @@ -34,8 +34,8 @@ - io.helidon.tracing - helidon-tracing-opentelemetry + io.helidon.tracing.providers + helidon-tracing-providers-opentelemetry io.opentelemetry diff --git a/microprofile/telemetry/src/main/java/io/helidon/microprofile/telemetry/OpenTelemetryProducer.java b/microprofile/telemetry/src/main/java/io/helidon/microprofile/telemetry/OpenTelemetryProducer.java index 461ae9a7736..393846c1ef6 100644 --- a/microprofile/telemetry/src/main/java/io/helidon/microprofile/telemetry/OpenTelemetryProducer.java +++ b/microprofile/telemetry/src/main/java/io/helidon/microprofile/telemetry/OpenTelemetryProducer.java @@ -21,7 +21,7 @@ import io.helidon.common.LazyValue; import io.helidon.config.Config; -import io.helidon.tracing.opentelemetry.HelidonOpenTelemetry; +import io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry; import io.opentelemetry.api.GlobalOpenTelemetry; import io.opentelemetry.api.OpenTelemetry; diff --git a/microprofile/telemetry/src/main/java/module-info.java b/microprofile/telemetry/src/main/java/module-info.java index 3edc5562d73..76625917646 100644 --- a/microprofile/telemetry/src/main/java/module-info.java +++ b/microprofile/telemetry/src/main/java/module-info.java @@ -49,7 +49,7 @@ requires jersey.common; requires microprofile.config.api; requires opentelemetry.instrumentation.annotations; - requires io.helidon.tracing.opentelemetry; + requires io.helidon.tracing.providers.opentelemetry; exports io.helidon.microprofile.telemetry; diff --git a/microprofile/telemetry/src/test/java/io/helidon/microprofile/telemetry/AgentDetectorTest.java b/microprofile/telemetry/src/test/java/io/helidon/microprofile/telemetry/AgentDetectorTest.java index e5de1bc6d04..fbc42a757e7 100644 --- a/microprofile/telemetry/src/test/java/io/helidon/microprofile/telemetry/AgentDetectorTest.java +++ b/microprofile/telemetry/src/test/java/io/helidon/microprofile/telemetry/AgentDetectorTest.java @@ -21,7 +21,7 @@ import io.helidon.microprofile.tests.junit5.AddConfig; import io.helidon.microprofile.tests.junit5.AddExtension; import io.helidon.microprofile.tests.junit5.HelidonTest; -import io.helidon.tracing.opentelemetry.HelidonOpenTelemetry; +import io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry; import jakarta.enterprise.inject.spi.CDI; import org.junit.jupiter.api.Test; diff --git a/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerBuilder.java b/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerBuilder.java index ecd53bde06a..2d0798d71e5 100644 --- a/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerBuilder.java +++ b/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerBuilder.java @@ -19,7 +19,7 @@ import java.net.URI; import io.helidon.common.config.Config; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; import io.opentracing.Tracer; import io.opentracing.mock.MockTracer; diff --git a/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerProvider.java b/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerProvider.java index 2130ec5f482..2acfdcec040 100644 --- a/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerProvider.java +++ b/microprofile/tests/tck/tck-opentracing/src/test/java/io/helidon/microprofile/opentracing/tck/OpentracingJavaMockTracerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import io.helidon.common.Weight; import io.helidon.common.Weighted; -import io.helidon.tracing.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; /** * Provider for opentracing TCK. diff --git a/microprofile/tracing/pom.xml b/microprofile/tracing/pom.xml index f056fca09a1..135dc116950 100644 --- a/microprofile/tracing/pom.xml +++ b/microprofile/tracing/pom.xml @@ -45,12 +45,12 @@ helidon-nima-webserver-tracing - io.helidon.tracing - helidon-tracing-opentracing + io.helidon.tracing.providers + helidon-tracing-providers-opentracing - io.helidon.tracing - helidon-tracing-opentelemetry + io.helidon.tracing.providers + helidon-tracing-providers-opentelemetry io.opentelemetry diff --git a/microprofile/tracing/src/main/java/module-info.java b/microprofile/tracing/src/main/java/module-info.java index e4039058eb6..6976ed024eb 100644 --- a/microprofile/tracing/src/main/java/module-info.java +++ b/microprofile/tracing/src/main/java/module-info.java @@ -50,7 +50,7 @@ requires io.helidon.tracing.config; requires transitive io.helidon.tracing.jersey; requires io.helidon.tracing.tracerresolver; - requires io.helidon.tracing.opentelemetry; + requires io.helidon.tracing.providers.opentelemetry; requires transitive microprofile.opentracing.api; requires microprofile.rest.client.api; diff --git a/microprofile/tracing/src/test/java/io/helidon/microprofile/tracing/TestTracerProvider.java b/microprofile/tracing/src/test/java/io/helidon/microprofile/tracing/TestTracerProvider.java index be4b76869d0..0bee6f123cb 100644 --- a/microprofile/tracing/src/test/java/io/helidon/microprofile/tracing/TestTracerProvider.java +++ b/microprofile/tracing/src/test/java/io/helidon/microprofile/tracing/TestTracerProvider.java @@ -21,8 +21,8 @@ import io.helidon.common.config.Config; import io.helidon.tracing.Tag; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; -import io.helidon.tracing.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; import io.opentracing.Scope; import io.opentracing.ScopeManager; diff --git a/tests/integration/mp-gh-2461/pom.xml b/tests/integration/mp-gh-2461/pom.xml index daf235e88a3..18447c6cac6 100644 --- a/tests/integration/mp-gh-2461/pom.xml +++ b/tests/integration/mp-gh-2461/pom.xml @@ -40,8 +40,8 @@ helidon-microprofile-tracing - io.helidon.tracing - helidon-tracing-jaeger + io.helidon.tracing.providers + helidon-tracing-providers-jaeger org.junit.jupiter diff --git a/tests/integration/mp-gh-5328/pom.xml b/tests/integration/mp-gh-5328/pom.xml index e747a69b837..d903e709f8c 100644 --- a/tests/integration/mp-gh-5328/pom.xml +++ b/tests/integration/mp-gh-5328/pom.xml @@ -40,8 +40,8 @@ helidon-microprofile-tracing - io.helidon.tracing - helidon-tracing-jaeger + io.helidon.tracing.providers + helidon-tracing-providers-jaeger io.helidon.nima.webclient diff --git a/tests/integration/native-image/mp-1/pom.xml b/tests/integration/native-image/mp-1/pom.xml index 873134df268..81b4c8e1d2c 100644 --- a/tests/integration/native-image/mp-1/pom.xml +++ b/tests/integration/native-image/mp-1/pom.xml @@ -57,8 +57,8 @@ true - io.helidon.tracing - helidon-tracing-jaeger + io.helidon.tracing.providers + helidon-tracing-providers-jaeger runtime diff --git a/tests/integration/native-image/nima-1/pom.xml b/tests/integration/native-image/nima-1/pom.xml index da2c7fa77f6..5fa66ad8d01 100644 --- a/tests/integration/native-image/nima-1/pom.xml +++ b/tests/integration/native-image/nima-1/pom.xml @@ -63,8 +63,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.nima.observe diff --git a/tests/integration/webclient/pom.xml b/tests/integration/webclient/pom.xml index e3cf6df2941..2ff708de625 100644 --- a/tests/integration/webclient/pom.xml +++ b/tests/integration/webclient/pom.xml @@ -73,8 +73,8 @@ helidon-security-providers-http-auth - io.helidon.tracing - helidon-tracing-opentracing + io.helidon.tracing.providers + helidon-tracing-providers-opentracing io.helidon.nima.http.media diff --git a/tests/integration/zipkin-mp-2.2/pom.xml b/tests/integration/zipkin-mp-2.2/pom.xml index 413a928a43f..bb657b2615e 100644 --- a/tests/integration/zipkin-mp-2.2/pom.xml +++ b/tests/integration/zipkin-mp-2.2/pom.xml @@ -35,8 +35,8 @@ helidon-microprofile - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin io.helidon.microprofile.tracing diff --git a/tracing/pom.xml b/tracing/pom.xml index 4a7e2efebc2..93b0abdd4fa 100644 --- a/tracing/pom.xml +++ b/tracing/pom.xml @@ -31,14 +31,11 @@ tracing - opentelemetry - opentracing jersey-client jersey - zipkin tests - jaeger config tracer-resolver + providers diff --git a/tracing/jaeger/pom.xml b/tracing/providers/jaeger/pom.xml similarity index 93% rename from tracing/jaeger/pom.xml rename to tracing/providers/jaeger/pom.xml index 072371b9735..43c361a3eaf 100644 --- a/tracing/jaeger/pom.xml +++ b/tracing/providers/jaeger/pom.xml @@ -20,12 +20,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.helidon.tracing - helidon-tracing-project + io.helidon.tracing.providers + helidon-tracing-providers-project 4.0.0-SNAPSHOT - helidon-tracing-jaeger + helidon-tracing-providers-jaeger Helidon Tracing Jaeger @@ -46,8 +46,8 @@ opentelemetry-exporter-jaeger - io.helidon.tracing - helidon-tracing-opentelemetry + io.helidon.tracing.providers + helidon-tracing-providers-opentelemetry io.helidon.common diff --git a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerDataPropagationProvider.java b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProvider.java similarity index 93% rename from tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerDataPropagationProvider.java rename to tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProvider.java index d4f832de0f8..4cb58534d99 100644 --- a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerDataPropagationProvider.java +++ b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022 Oracle and/or its affiliates. + * Copyright (c) 2021, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import io.helidon.common.context.Contexts; import io.helidon.common.context.spi.DataPropagationProvider; import io.helidon.tracing.Scope; import io.helidon.tracing.Span; import io.helidon.tracing.Tracer; -import io.helidon.tracing.opentelemetry.OpenTelemetryTracerProvider; +import io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; /** * A data propagation provider for Jaeger. Makes sure span are properly propagated diff --git a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerBuilder.java b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java similarity index 95% rename from tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerBuilder.java rename to tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java index 628c8d6cb55..200d6f41984 100644 --- a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerBuilder.java +++ b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import java.lang.System.Logger.Level; import java.time.Duration; @@ -30,8 +30,8 @@ import io.helidon.config.metadata.ConfiguredOption; import io.helidon.tracing.Tracer; import io.helidon.tracing.TracerBuilder; -import io.helidon.tracing.opentelemetry.HelidonOpenTelemetry; -import io.helidon.tracing.opentelemetry.OpenTelemetryTracerProvider; +import io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry; +import io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; import io.opentelemetry.api.GlobalOpenTelemetry; import io.opentelemetry.api.OpenTelemetry; @@ -52,11 +52,11 @@ import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; /** - * The JaegerTracerBuilder is a convenience builder for {@link io.helidon.tracing.Tracer} to use with Jaeger. + * The JaegerTracerBuilder is a convenience builder for {@link Tracer} to use with Jaeger. *

* Unless You want to explicitly depend on Jaeger in Your code, please - * use {@link io.helidon.tracing.TracerBuilder#create(String)} or - * {@link io.helidon.tracing.TracerBuilder#create(io.helidon.common.config.Config)} that is abstracted. + * use {@link TracerBuilder#create(String)} or + * {@link TracerBuilder#create(io.helidon.common.config.Config)} that is abstracted. *

* The Jaeger tracer uses environment variables and system properties to override the defaults. * Except for {@code protocol} and {@code service} these are honored, unless overridden in configuration @@ -131,17 +131,17 @@ * * {@code tags} *   - * see {@link io.helidon.tracing.TracerBuilder} + * see {@link TracerBuilder} * * * {@code boolean-tags} *   - * see {@link io.helidon.tracing.TracerBuilder} + * see {@link TracerBuilder} * * * {@code int-tags} *   - * see {@link io.helidon.tracing.TracerBuilder} + * see {@link TracerBuilder} * * */ @@ -177,7 +177,7 @@ protected JaegerTracerBuilder() { } /** - * Get a Jaeger {@link io.helidon.tracing.Tracer } builder for processing tracing data of a service with a given name. + * Get a Jaeger {@link Tracer } builder for processing tracing data of a service with a given name. * * @param serviceName name of the service that will be using the tracer. * @return {@code Tracer} builder for Jaeger. @@ -193,7 +193,7 @@ public static JaegerTracerBuilder forService(String serviceName) { * * @param config configuration to load this builder from * @return a new builder instance. - * @see io.helidon.tracing.jaeger.JaegerTracerBuilder#config(io.helidon.common.config.Config) + * @see JaegerTracerBuilder#config(io.helidon.common.config.Config) */ public static JaegerTracerBuilder create(Config config) { return create().config(config); @@ -408,7 +408,7 @@ public JaegerTracerBuilder addPropagation(PropagationFormat propagationFormat) { } /** - * Builds the {@link io.helidon.tracing.Tracer} for Jaeger based on the configured parameters. + * Builds the {@link Tracer} for Jaeger based on the configured parameters. * * @return the tracer */ diff --git a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerProvider.java b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerProvider.java similarity index 86% rename from tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerProvider.java rename to tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerProvider.java index dcfe79aff7d..e8195c4f114 100644 --- a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerProvider.java +++ b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import java.util.Optional; @@ -21,8 +21,8 @@ import io.helidon.common.Weighted; import io.helidon.tracing.Span; import io.helidon.tracing.Tracer; -import io.helidon.tracing.opentelemetry.HelidonOpenTelemetry; -import io.helidon.tracing.opentelemetry.OpenTelemetryTracerProvider; +import io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry; +import io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; import io.helidon.tracing.spi.TracerProvider; import io.opentelemetry.context.Context; diff --git a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/package-info.java b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/package-info.java similarity index 78% rename from tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/package-info.java rename to tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/package-info.java index 580edb8f48e..4423817a438 100644 --- a/tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/package-info.java +++ b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,6 @@ /** * Helidon integration with Jaeger tracer. * - * @see io.helidon.tracing.jaeger.JaegerTracerBuilder + * @see io.helidon.tracing.providers.jaeger.JaegerTracerBuilder */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; diff --git a/tracing/jaeger/src/main/java/module-info.java b/tracing/providers/jaeger/src/main/java/module-info.java similarity index 77% rename from tracing/jaeger/src/main/java/module-info.java rename to tracing/providers/jaeger/src/main/java/module-info.java index 4d6bc64314a..31c5f51ab58 100644 --- a/tracing/jaeger/src/main/java/module-info.java +++ b/tracing/providers/jaeger/src/main/java/module-info.java @@ -16,6 +16,9 @@ import io.helidon.common.features.api.Feature; import io.helidon.common.features.api.HelidonFlavor; +import io.helidon.tracing.providers.jaeger.JaegerDataPropagationProvider; +import io.helidon.tracing.providers.jaeger.JaegerTracerProvider; +import io.helidon.tracing.spi.TracerProvider; /** * Jaeger tracing support. @@ -25,13 +28,13 @@ in = {HelidonFlavor.SE, HelidonFlavor.MP, HelidonFlavor.NIMA}, path = {"Tracing", "Jaeger"} ) -module io.helidon.tracing.jaeger { +module io.helidon.tracing.providers.jaeger { requires static io.helidon.common.features.api; requires transitive io.helidon.common; requires transitive io.helidon.common.config; requires io.helidon.tracing; - requires io.helidon.tracing.opentelemetry; + requires io.helidon.tracing.providers.opentelemetry; requires io.helidon.common.context; requires io.helidon.common.configurable; @@ -42,9 +45,9 @@ requires io.opentelemetry.sdk.trace; requires io.opentelemetry.sdk.common; - exports io.helidon.tracing.jaeger; + exports io.helidon.tracing.providers.jaeger; - provides io.helidon.tracing.spi.TracerProvider with io.helidon.tracing.jaeger.JaegerTracerProvider; - provides io.helidon.common.context.spi.DataPropagationProvider with io.helidon.tracing.jaeger.JaegerDataPropagationProvider; + provides TracerProvider with JaegerTracerProvider; + provides io.helidon.common.context.spi.DataPropagationProvider with JaegerDataPropagationProvider; } diff --git a/tracing/jaeger/src/main/resources/META-INF/native-image/helidon/reflection-config.json b/tracing/providers/jaeger/src/main/resources/META-INF/native-image/helidon/reflection-config.json similarity index 100% rename from tracing/jaeger/src/main/resources/META-INF/native-image/helidon/reflection-config.json rename to tracing/providers/jaeger/src/main/resources/META-INF/native-image/helidon/reflection-config.json diff --git a/tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties b/tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties similarity index 82% rename from tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties rename to tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties index b0bdcb8a31d..65ed88bfab7 100644 --- a/tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties +++ b/tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/native-image.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2022 Oracle and/or its affiliates. +# Copyright (c) 2019, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ # limitations under the License. # -Args=--initialize-at-build-time=org.slf4j,io.helidon.tracing.jaeger \ +Args=--initialize-at-build-time=org.slf4j,io.helidon.tracing.providers.jaeger \ -H:+AddAllCharsets \ -H:EnableURLProtocols=http \ -H:EnableURLProtocols=https diff --git a/tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/reflect-config.json b/tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/reflect-config.json similarity index 100% rename from tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/reflect-config.json rename to tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/reflect-config.json diff --git a/tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/resource-config.json b/tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/resource-config.json similarity index 100% rename from tracing/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/resource-config.json rename to tracing/providers/jaeger/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-jaeger/resource-config.json diff --git a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerBaggageTest.java b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerBaggageTest.java similarity index 97% rename from tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerBaggageTest.java rename to tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerBaggageTest.java index 58d487ac480..cff9dc05cf5 100644 --- a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerBaggageTest.java +++ b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerBaggageTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import java.util.Optional; diff --git a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerDataPropagationProviderTest.java b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProviderTest.java similarity index 94% rename from tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerDataPropagationProviderTest.java rename to tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProviderTest.java index 17fddf80131..3be819678d6 100644 --- a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerDataPropagationProviderTest.java +++ b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerDataPropagationProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022 Oracle and/or its affiliates. + * Copyright (c) 2021, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import io.helidon.common.context.Context; import io.helidon.common.context.Contexts; diff --git a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerTracerBuilderTest.java b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilderTest.java similarity index 99% rename from tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerTracerBuilderTest.java rename to tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilderTest.java index 062502ea2df..d37ec13184d 100644 --- a/tracing/jaeger/src/test/java/io/helidon/tracing/jaeger/JaegerTracerBuilderTest.java +++ b/tracing/providers/jaeger/src/test/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilderTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.jaeger; +package io.helidon.tracing.providers.jaeger; import java.util.List; import java.util.Map; diff --git a/tracing/jaeger/src/test/resources/application.yaml b/tracing/providers/jaeger/src/test/resources/application.yaml similarity index 100% rename from tracing/jaeger/src/test/resources/application.yaml rename to tracing/providers/jaeger/src/test/resources/application.yaml diff --git a/tracing/opentelemetry/pom.xml b/tracing/providers/opentelemetry/pom.xml similarity index 93% rename from tracing/opentelemetry/pom.xml rename to tracing/providers/opentelemetry/pom.xml index e3f8a84bc27..7d14d56acb7 100644 --- a/tracing/opentelemetry/pom.xml +++ b/tracing/providers/opentelemetry/pom.xml @@ -19,12 +19,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.helidon.tracing - helidon-tracing-project + io.helidon.tracing.providers + helidon-tracing-providers-project 4.0.0-SNAPSHOT - helidon-tracing-opentelemetry + helidon-tracing-providers-opentelemetry Helidon Tracing Open Telemetry diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/HelidonOpenTelemetry.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/HelidonOpenTelemetry.java similarity index 98% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/HelidonOpenTelemetry.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/HelidonOpenTelemetry.java index 490445f86ed..8b3d18d7688 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/HelidonOpenTelemetry.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/HelidonOpenTelemetry.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.Map; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryScope.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryScope.java similarity index 91% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryScope.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryScope.java index 5d092f283fb..edd7aa13d03 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryScope.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpan.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpan.java similarity index 98% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpan.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpan.java index b689c467e08..3fc6207ba6e 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpan.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpan.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.Map; import java.util.Objects; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanBuilder.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanBuilder.java similarity index 98% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanBuilder.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanBuilder.java index a6d0fa55778..5faff4ef285 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanBuilder.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanBuilder.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.time.Instant; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanContext.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanContext.java similarity index 96% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanContext.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanContext.java index 1cb7c86ff15..6dad237df31 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetrySpanContext.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetrySpanContext.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import io.helidon.tracing.SpanContext; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracer.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracer.java similarity index 99% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracer.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracer.java index e990daf3819..0cd064b58c3 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracer.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.Map; import java.util.Optional; diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracerProvider.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java similarity index 96% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracerProvider.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java index 67ba0b1c31f..038456fd792 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/OpenTelemetryTracerProvider.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.Map; import java.util.Optional; @@ -34,7 +34,7 @@ import io.opentelemetry.api.OpenTelemetry; /** - * Service loader provider implementation for {@link io.helidon.tracing.spi.TracerProvider}. + * Service loader provider implementation for {@link TracerProvider}. */ @Weight(Weighted.DEFAULT_WEIGHT - 50) public class OpenTelemetryTracerProvider implements TracerProvider { diff --git a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/package-info.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java similarity index 80% rename from tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/package-info.java rename to tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java index 0f845f17faf..b0cae627c0b 100644 --- a/tracing/opentelemetry/src/main/java/io/helidon/tracing/opentelemetry/package-info.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,6 @@ * Open Telemetry tracing support that plugs into the {@link io.helidon.tracing.TracerBuilder} SPI and provides * a {@link io.helidon.tracing.Tracer} implementation. * - * @see io.helidon.tracing.opentelemetry.HelidonOpenTelemetry + * @see io.helidon.tracing.providers.opentelemetry.HelidonOpenTelemetry */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; diff --git a/tracing/opentelemetry/src/main/java/module-info.java b/tracing/providers/opentelemetry/src/main/java/module-info.java similarity index 78% rename from tracing/opentelemetry/src/main/java/module-info.java rename to tracing/providers/opentelemetry/src/main/java/module-info.java index cec9a9dda96..6b14def1774 100644 --- a/tracing/opentelemetry/src/main/java/module-info.java +++ b/tracing/providers/opentelemetry/src/main/java/module-info.java @@ -13,10 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; +import io.helidon.tracing.spi.TracerProvider; + /** * Open telemetry support for Helidon tracing. */ -module io.helidon.tracing.opentelemetry { +module io.helidon.tracing.providers.opentelemetry { requires io.helidon.tracing; requires io.helidon.common.context; @@ -29,7 +33,7 @@ requires io.helidon.common.config; requires io.helidon.config; - exports io.helidon.tracing.opentelemetry; + exports io.helidon.tracing.providers.opentelemetry; - provides io.helidon.tracing.spi.TracerProvider with io.helidon.tracing.opentelemetry.OpenTelemetryTracerProvider; + provides TracerProvider with OpenTelemetryTracerProvider; } \ No newline at end of file diff --git a/tracing/opentelemetry/src/test/java/io/helidon/tracing/opentelemetry/AgentDetectorTest.java b/tracing/providers/opentelemetry/src/test/java/io/helidon/tracing/providers/opentelemetry/AgentDetectorTest.java similarity index 97% rename from tracing/opentelemetry/src/test/java/io/helidon/tracing/opentelemetry/AgentDetectorTest.java rename to tracing/providers/opentelemetry/src/test/java/io/helidon/tracing/providers/opentelemetry/AgentDetectorTest.java index 7769947fc91..d631b36112d 100644 --- a/tracing/opentelemetry/src/test/java/io/helidon/tracing/opentelemetry/AgentDetectorTest.java +++ b/tracing/providers/opentelemetry/src/test/java/io/helidon/tracing/providers/opentelemetry/AgentDetectorTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.opentelemetry; +package io.helidon.tracing.providers.opentelemetry; import java.util.Map; diff --git a/tracing/opentracing/etc/spotbugs/exclude.xml b/tracing/providers/opentracing/etc/spotbugs/exclude.xml similarity index 89% rename from tracing/opentracing/etc/spotbugs/exclude.xml rename to tracing/providers/opentracing/etc/spotbugs/exclude.xml index b753f6cc94c..e32a317e920 100644 --- a/tracing/opentracing/etc/spotbugs/exclude.xml +++ b/tracing/providers/opentracing/etc/spotbugs/exclude.xml @@ -1,7 +1,7 @@ - + diff --git a/tracing/opentracing/pom.xml b/tracing/providers/opentracing/pom.xml similarity index 94% rename from tracing/opentracing/pom.xml rename to tracing/providers/opentracing/pom.xml index 09dd06543a5..a1f84bb4c50 100644 --- a/tracing/opentracing/pom.xml +++ b/tracing/providers/opentracing/pom.xml @@ -19,12 +19,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.helidon.tracing - helidon-tracing-project + io.helidon.tracing.providers + helidon-tracing-providers-project 4.0.0-SNAPSHOT - helidon-tracing-opentracing + helidon-tracing-providers-opentracing Helidon Tracing Open Tracing As OpenTracing is now discontinued, this is a backward compatibility module to support it. Please switch to Open Telemetry diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/NoOpBuilder.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/NoOpBuilder.java similarity index 98% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/NoOpBuilder.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/NoOpBuilder.java index 17b4ef8d176..98529c15713 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/NoOpBuilder.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/NoOpBuilder.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.net.URI; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracing.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracing.java similarity index 90% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracing.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracing.java index 652ed6da7bd..c5b918979be 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracing.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import io.helidon.tracing.Span; @@ -41,7 +41,7 @@ public static io.helidon.tracing.Tracer create(Tracer tracer) { * * @param tracer the tracer that created the span * @param span open telemetry span - * @return Helidon {@link io.helidon.tracing.Span} + * @return Helidon {@link Span} */ public static Span create(Tracer tracer, io.opentracing.Span span) { return new OpenTracingSpan(tracer, span); diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingContext.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingContext.java similarity index 91% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingContext.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingContext.java index 4daf3af9bab..b522eb1e611 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingContext.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import io.helidon.tracing.Span; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingProviderHelper.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingProviderHelper.java similarity index 88% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingProviderHelper.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingProviderHelper.java index 9c353ee8d13..fe76b55fa60 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingProviderHelper.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingProviderHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.util.ServiceLoader; import io.helidon.common.HelidonServiceLoader; -import io.helidon.tracing.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; /** * Tracer provider helper to find implementation to use. diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingScope.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingScope.java similarity index 91% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingScope.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingScope.java index 03e17a2d059..c8c09902096 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingScope.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpan.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpan.java similarity index 98% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpan.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpan.java index e67c91812f6..c0bdafbdd05 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpan.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpan.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.util.HashMap; import java.util.Map; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpanBuilder.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpanBuilder.java similarity index 95% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpanBuilder.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpanBuilder.java index d7675ee505f..7e9711ad43e 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingSpanBuilder.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingSpanBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.time.Instant; import java.util.concurrent.TimeUnit; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracer.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracer.java similarity index 99% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracer.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracer.java index de2aace9579..a3644f877b8 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracer.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.util.HashMap; import java.util.Iterator; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerBuilder.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerBuilder.java similarity index 99% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerBuilder.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerBuilder.java index 1728b49341e..477f91ffc5d 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerBuilder.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerBuilder.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.net.URI; import java.util.Objects; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerProvider.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerProvider.java similarity index 92% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerProvider.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerProvider.java index 067031b117a..557ac152db3 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/OpenTracingTracerProvider.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/OpenTracingTracerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; import java.util.Optional; @@ -28,7 +28,7 @@ import io.opentracing.util.GlobalTracer; /** - * {@link java.util.ServiceLoader} service implementation of {@link io.helidon.tracing.spi.TracerProvider} for Open Tracing + * {@link java.util.ServiceLoader} service implementation of {@link TracerProvider} for Open Tracing * tracers. */ @Weight(Weighted.DEFAULT_WEIGHT - 50) // low weight, so it is easy to override diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/package-info.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java similarity index 62% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/package-info.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java index 6256d2a4397..83a8fbdcf9f 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/package-info.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,9 @@ */ /** - * Open Tracing tracing support that plugs into the {@link io.helidon.tracing.TracerBuilder} SPI and provides - * a {@link io.helidon.tracing.Tracer} implementation. + * Open Tracing support that plugs into the {@link io.helidon.tracing.providers.TracerBuilder} SPI and provides + * a {@link io.helidon.tracing.providers.Tracer} implementation. * - * @see io.helidon.tracing.opentracing.OpenTracing + * @see io.helidon.tracing.providers.opentracing.OpenTracing */ -package io.helidon.tracing.opentracing; +package io.helidon.tracing.providers.opentracing; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/OpenTracingProvider.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/OpenTracingProvider.java similarity index 90% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/OpenTracingProvider.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/OpenTracingProvider.java index 8aacd60121c..302eb9240a6 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/OpenTracingProvider.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/OpenTracingProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.opentracing.spi; +package io.helidon.tracing.providers.opentracing.spi; import io.helidon.tracing.HeaderConsumer; import io.helidon.tracing.HeaderProvider; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; import io.opentracing.SpanContext; import io.opentracing.Tracer; diff --git a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/package-info.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/package-info.java similarity index 84% rename from tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/package-info.java rename to tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/package-info.java index 0daae8a2f7d..95a149f4003 100644 --- a/tracing/opentracing/src/main/java/io/helidon/tracing/opentracing/spi/package-info.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/spi/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ /** * Open Tracing specific SPI, to add various tracers. */ -package io.helidon.tracing.opentracing.spi; +package io.helidon.tracing.providers.opentracing.spi; diff --git a/tracing/opentracing/src/main/java/module-info.java b/tracing/providers/opentracing/src/main/java/module-info.java similarity index 68% rename from tracing/opentracing/src/main/java/module-info.java rename to tracing/providers/opentracing/src/main/java/module-info.java index bf30fb292fb..e21707ad825 100644 --- a/tracing/opentracing/src/main/java/module-info.java +++ b/tracing/providers/opentracing/src/main/java/module-info.java @@ -13,12 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import io.helidon.tracing.providers.opentracing.OpenTracingTracerProvider; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.spi.TracerProvider; + /** * Open tracing support for Helidon tracing. */ -module io.helidon.tracing.opentracing { - exports io.helidon.tracing.opentracing.spi; - exports io.helidon.tracing.opentracing; +module io.helidon.tracing.providers.opentracing { + exports io.helidon.tracing.providers.opentracing.spi; + exports io.helidon.tracing.providers.opentracing; requires transitive io.helidon.common; requires transitive io.helidon.common.config; requires transitive io.helidon.tracing; @@ -28,6 +33,6 @@ requires io.opentracing.api; requires io.opentracing.noop; - uses io.helidon.tracing.opentracing.spi.OpenTracingProvider; - provides io.helidon.tracing.spi.TracerProvider with io.helidon.tracing.opentracing.OpenTracingTracerProvider; + uses OpenTracingProvider; + provides TracerProvider with OpenTracingTracerProvider; } \ No newline at end of file diff --git a/tracing/providers/pom.xml b/tracing/providers/pom.xml new file mode 100644 index 00000000000..60ca7b107d2 --- /dev/null +++ b/tracing/providers/pom.xml @@ -0,0 +1,38 @@ + + + + + 4.0.0 + + io.helidon.tracing + helidon-tracing-project + 4.0.0-SNAPSHOT + + pom + io.helidon.tracing.providers + helidon-tracing-providers-project + Helidon Tracing Providers Project + + + opentracing + opentelemetry + jaeger + zipkin + + diff --git a/tracing/zipkin/pom.xml b/tracing/providers/zipkin/pom.xml similarity index 92% rename from tracing/zipkin/pom.xml rename to tracing/providers/zipkin/pom.xml index 48befa8ef4e..0817dc020e5 100644 --- a/tracing/zipkin/pom.xml +++ b/tracing/providers/zipkin/pom.xml @@ -20,12 +20,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.helidon.tracing - helidon-tracing-project + io.helidon.tracing.providers + helidon-tracing-providers-project 4.0.0-SNAPSHOT - helidon-tracing-zipkin + helidon-tracing-providers-zipkin Helidon Tracing Zipkin @@ -42,8 +42,8 @@ helidon-common-config - io.helidon.tracing - helidon-tracing-opentracing + io.helidon.tracing.providers + helidon-tracing-providers-opentracing io.opentracing diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinScopeManager.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinScopeManager.java similarity index 93% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinScopeManager.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinScopeManager.java index c1102fe473a..07565b7d5b3 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinScopeManager.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinScopeManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import brave.opentracing.BraveScopeManager; import io.opentracing.Scope; diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpan.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpan.java similarity index 96% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpan.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpan.java index 89347fcf403..d08cd1530fc 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpan.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpan.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.util.Map; diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpanBuilder.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpanBuilder.java similarity index 96% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpanBuilder.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpanBuilder.java index 44810e34066..37672954b4e 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinSpanBuilder.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinSpanBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.util.List; diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracer.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracer.java similarity index 93% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracer.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracer.java index 53db8e8c522..dcd3a706c07 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracer.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,12 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.util.List; import io.helidon.tracing.Tag; +import io.helidon.tracing.TracerBuilder; import brave.opentracing.BraveTracer; import io.opentracing.Scope; @@ -32,7 +33,7 @@ * The ZipkinTracer delegates to {@link BraveTracer} while creating {@link ZipkinSpanBuilder} * instead of {@link brave.opentracing.BraveSpanBuilder}. * This class should not be sued directly, use either - * {@link io.helidon.tracing.TracerBuilder} or {@link ZipkinTracerBuilder}. + * {@link TracerBuilder} or {@link ZipkinTracerBuilder}. * * @see Zipkin Attributes * @see Zipkin Missing Service Name diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerBuilder.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilder.java similarity index 99% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerBuilder.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilder.java index 699de3d7664..ddbac1cb6bf 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerBuilder.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.lang.System.Logger.Level; import java.net.MalformedURLException; @@ -29,7 +29,7 @@ import io.helidon.config.metadata.ConfiguredOption; import io.helidon.tracing.Tag; import io.helidon.tracing.TracerBuilder; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; import brave.Tracing; import brave.opentracing.BraveTracer; diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerProvider.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProvider.java similarity index 97% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerProvider.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProvider.java index a60f2200ef4..28dcbd6ca68 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/ZipkinTracerProvider.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.lang.System.Logger.Level; import java.util.Iterator; @@ -24,7 +24,7 @@ import io.helidon.common.Weighted; import io.helidon.tracing.HeaderConsumer; import io.helidon.tracing.HeaderProvider; -import io.helidon.tracing.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; import io.opentracing.SpanContext; import io.opentracing.Tracer; diff --git a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/package-info.java b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/package-info.java similarity index 87% rename from tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/package-info.java rename to tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/package-info.java index 1cb3cd25ad7..4591e983c1c 100644 --- a/tracing/zipkin/src/main/java/io/helidon/tracing/zipkin/package-info.java +++ b/tracing/providers/zipkin/src/main/java/io/helidon/tracing/providers/zipkin/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,4 +21,4 @@ * @see zipkin2.Span * @see io.opentracing.Span */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; diff --git a/tracing/providers/zipkin/src/main/java/module-info.java b/tracing/providers/zipkin/src/main/java/module-info.java new file mode 100644 index 00000000000..3b2273bb2f6 --- /dev/null +++ b/tracing/providers/zipkin/src/main/java/module-info.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. + * + * 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. + */ + +/** + * Zipkin tracing support. + */ +module io.helidon.tracing.providers.zipkin { + requires io.helidon.common; + requires io.helidon.common.config; + requires io.helidon.tracing; + requires io.helidon.tracing.providers.opentracing; + requires static io.helidon.config.metadata; + + requires java.logging; + requires io.opentracing.util; + requires brave.opentracing; + requires zipkin2.reporter; + requires zipkin2.reporter.urlconnection; + requires zipkin2; + requires brave; + requires io.opentracing.noop; + requires io.opentracing.api; + + exports io.helidon.tracing.providers.zipkin; + + provides io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider with io.helidon.tracing.providers.zipkin.ZipkinTracerProvider; +} \ No newline at end of file diff --git a/tracing/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties b/tracing/providers/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties similarity index 84% rename from tracing/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties rename to tracing/providers/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties index c32396f5f67..0570d0bd77d 100644 --- a/tracing/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties +++ b/tracing/providers/zipkin/src/main/resources/META-INF/native-image/io.helidon.tracing/helidon-tracing-zipkin/native-image.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2022 Oracle and/or its affiliates. +# Copyright (c) 2019, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,5 +19,5 @@ # Zipkin requires http support over URL connection # Args=--enable-url-protocols=http \ - --initialize-at-build-time=io.helidon.tracing.zipkin,zipkin2 + --initialize-at-build-time=io.helidon.tracing.providers..zipkin,zipkin2 diff --git a/tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerBuilderTest.java b/tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilderTest.java similarity index 98% rename from tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerBuilderTest.java rename to tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilderTest.java index e6387a0da21..d6c2c5a2494 100644 --- a/tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerBuilderTest.java +++ b/tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerBuilderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.net.URI; import java.util.List; diff --git a/tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerProviderTest.java b/tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProviderTest.java similarity index 98% rename from tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerProviderTest.java rename to tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProviderTest.java index aa37489b44e..4f523e8db69 100644 --- a/tracing/zipkin/src/test/java/io/helidon/tracing/zipkin/ZipkinTracerProviderTest.java +++ b/tracing/providers/zipkin/src/test/java/io/helidon/tracing/providers/zipkin/ZipkinTracerProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022 Oracle and/or its affiliates. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.tracing.zipkin; +package io.helidon.tracing.providers.zipkin; import java.util.HashMap; import java.util.List; diff --git a/tracing/zipkin/src/test/resources/application.yaml b/tracing/providers/zipkin/src/test/resources/application.yaml similarity index 95% rename from tracing/zipkin/src/test/resources/application.yaml rename to tracing/providers/zipkin/src/test/resources/application.yaml index a7bc3172d59..0f359e5fb7e 100644 --- a/tracing/zipkin/src/test/resources/application.yaml +++ b/tracing/providers/zipkin/src/test/resources/application.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2022 Oracle and/or its affiliates. +# Copyright (c) 2017, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tracing/tests/it-tracing-client-zipkin/pom.xml b/tracing/tests/it-tracing-client-zipkin/pom.xml index 969905b372f..313e7a71390 100644 --- a/tracing/tests/it-tracing-client-zipkin/pom.xml +++ b/tracing/tests/it-tracing-client-zipkin/pom.xml @@ -33,8 +33,8 @@ - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin test diff --git a/tracing/tests/it-tracing-client-zipkin/src/test/java/io/helidon/tracing/tests/it1/OpenTraceableClientE2ETest.java b/tracing/tests/it-tracing-client-zipkin/src/test/java/io/helidon/tracing/tests/it1/OpenTraceableClientE2ETest.java index 797dc27d19a..63e1abed3e6 100644 --- a/tracing/tests/it-tracing-client-zipkin/src/test/java/io/helidon/tracing/tests/it1/OpenTraceableClientE2ETest.java +++ b/tracing/tests/it-tracing-client-zipkin/src/test/java/io/helidon/tracing/tests/it1/OpenTraceableClientE2ETest.java @@ -33,8 +33,8 @@ import io.helidon.nima.webserver.tracing.TracingFeature; import io.helidon.tracing.Span; import io.helidon.tracing.jersey.client.ClientTracingFilter; -import io.helidon.tracing.opentracing.OpenTracing; -import io.helidon.tracing.zipkin.ZipkinTracer; +import io.helidon.tracing.providers.opentracing.OpenTracing; +import io.helidon.tracing.providers.zipkin.ZipkinTracer; import brave.Tracing; import brave.opentracing.BraveSpanContext; diff --git a/tracing/tracer-resolver/pom.xml b/tracing/tracer-resolver/pom.xml index 3bf2cab3452..a528ccda903 100644 --- a/tracing/tracer-resolver/pom.xml +++ b/tracing/tracer-resolver/pom.xml @@ -46,8 +46,8 @@ helidon-tracing - io.helidon.tracing - helidon-tracing-opentracing + io.helidon.tracing.providers + helidon-tracing-providers-opentracing io.opentracing diff --git a/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverBuilder.java b/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverBuilder.java index 3d37c7c63e0..3f11f5b692d 100644 --- a/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverBuilder.java +++ b/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverBuilder.java @@ -19,7 +19,7 @@ import java.lang.System.Logger.Level; import io.helidon.common.config.Config; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; import io.opentracing.Tracer; import io.opentracing.contrib.tracerresolver.TracerResolver; diff --git a/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverProvider.java b/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverProvider.java index 24d47daa08a..496ba63fdf6 100644 --- a/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverProvider.java +++ b/tracing/tracer-resolver/src/main/java/io/helidon/tracing/tracerresolver/TracerResolverProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022 Oracle and/or its affiliates. + * Copyright (c) 2020, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import io.helidon.common.Weight; import io.helidon.common.Weighted; -import io.helidon.tracing.opentracing.OpenTracingTracerBuilder; -import io.helidon.tracing.opentracing.spi.OpenTracingProvider; +import io.helidon.tracing.providers.opentracing.OpenTracingTracerBuilder; +import io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider; /** * Service to use {@link io.opentracing.contrib.tracerresolver.TracerResolver} to find tracer to use with Helidon. diff --git a/tracing/tracer-resolver/src/main/java/module-info.java b/tracing/tracer-resolver/src/main/java/module-info.java index 68c512ffd88..2501b3dd843 100644 --- a/tracing/tracer-resolver/src/main/java/module-info.java +++ b/tracing/tracer-resolver/src/main/java/module-info.java @@ -21,7 +21,7 @@ requires io.helidon.common; requires io.helidon.common.config; requires io.helidon.tracing; - requires io.helidon.tracing.opentracing; + requires io.helidon.tracing.providers.opentracing; requires io.opentracing.util; requires io.opentracing.noop; @@ -30,5 +30,5 @@ exports io.helidon.tracing.tracerresolver; - provides io.helidon.tracing.opentracing.spi.OpenTracingProvider with io.helidon.tracing.tracerresolver.TracerResolverProvider; + provides io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider with io.helidon.tracing.tracerresolver.TracerResolverProvider; } From 9f983a1bb8c0922cda2f5ca25964bde8c243ad7d Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Fri, 28 Jul 2023 15:24:19 +0300 Subject: [PATCH 2/7] Refactor to Tracing providers Signed-off-by: Dmitry Aleksandrov --- bom/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index dfbb731c0a0..73214acab4c 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -590,13 +590,13 @@ io.helidon.tracing.providers helidon-tracing-providers-opentracing - 4.0.0-SNAPSHOT + ${helidon.version} io.helidon.tracing.providers helidon-tracing-providers-opentelemetry - 4.0.0-SNAPSHOT + ${helidon.version} @@ -608,13 +608,13 @@ io.helidon.tracing.providers helidon-tracing-providers-zipkin - 4.0.0-SNAPSHOT + ${helidon.version} io.helidon.tracing.providers helidon-tracing-providers-jaeger - 4.0.0-SNAPSHOT + ${helidon.version} From 8aff11298eae58a195409baa387c320619e4965b Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Mon, 31 Jul 2023 11:49:17 +0300 Subject: [PATCH 3/7] Fix service providers Signed-off-by: Dmitry Aleksandrov --- ...helidon.tracing.providers.opentracing.spi.OpenTracingProvider} | 0 ...helidon.tracing.providers.opentracing.spi.OpenTracingProvider} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename microprofile/tests/tck/tck-opentracing/src/test/resources/META-INF/services/{io.helidon.tracing.opentracing.spi.OpenTracingProvider => io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider} (100%) rename microprofile/tracing/src/test/resources/META-INF/services/{io.helidon.tracing.opentracing.spi.OpenTracingProvider => io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider} (100%) diff --git a/microprofile/tests/tck/tck-opentracing/src/test/resources/META-INF/services/io.helidon.tracing.opentracing.spi.OpenTracingProvider b/microprofile/tests/tck/tck-opentracing/src/test/resources/META-INF/services/io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider similarity index 100% rename from microprofile/tests/tck/tck-opentracing/src/test/resources/META-INF/services/io.helidon.tracing.opentracing.spi.OpenTracingProvider rename to microprofile/tests/tck/tck-opentracing/src/test/resources/META-INF/services/io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider diff --git a/microprofile/tracing/src/test/resources/META-INF/services/io.helidon.tracing.opentracing.spi.OpenTracingProvider b/microprofile/tracing/src/test/resources/META-INF/services/io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider similarity index 100% rename from microprofile/tracing/src/test/resources/META-INF/services/io.helidon.tracing.opentracing.spi.OpenTracingProvider rename to microprofile/tracing/src/test/resources/META-INF/services/io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider From c83e7b8bed164abe078ab892471f337e6f897e1a Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Mon, 31 Jul 2023 12:48:43 +0300 Subject: [PATCH 4/7] Archetype and docs fixes Signed-off-by: Dmitry Aleksandrov --- THIRD_PARTY_LICENSES.txt | 16 +++++++-------- .../main/archetype/common/observability.xml | 8 ++++---- docs/includes/tracing/tracer-jaeger.adoc | 4 ++-- docs/includes/tracing/tracer-zipkin.adoc | 6 +++--- docs/mp/guides/tracing.adoc | 10 +++++----- docs/mp/tracing.adoc | 8 ++++---- docs/se/guides/tracing.adoc | 10 +++++----- etc/HELIDON_THIRD_PARTY_LICENSES.xml | 20 +++++++++---------- tracing/README.md | 10 +++++----- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 69a95fd4437..5ff7f7d4089 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -6,7 +6,7 @@ of Helidon. They are identified by the Helidon module(s) that use them. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Brave OpenTracing Java Bridge for Zipkin The OpenZipkin Authors Apache 2.0 -Used by: [helidon-tracing-zipkin] +Used by: [helidon-tracing-providers-zipkin] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Zipkin OpenTracing Brave (io.opentracing.brave:brave-opentracing) Copyright 2016-2020 The OpenZipkin Authors @@ -2730,7 +2730,7 @@ Fourth Party Runtime Dependencies =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= OpenTracing API for Java Opentracing.Io Apache 2.0 -Used by: [helidon-integrations-common-rest, helidon-reactive-dbclient-tracing, helidon-security-integration-jersey, helidon-tracing-opentracing, helidon-tracing-tracer-resolver, helidon-tracing-zipkin] +Used by: [helidon-integrations-common-rest, helidon-reactive-dbclient-tracing, helidon-security-integration-jersey, helidon-tracing-providers-opentracing, helidon-tracing-tracer-resolver, helidon-tracing-providers-zipkin] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= opentracing-util: 0.33.0, Apache 2.0 opentracing-mock: 0.33.0, Apache 2.0 @@ -2778,7 +2778,7 @@ Used by: [helidon-microprofile-reactive-streams, helidon-reactive-dbclient-mongo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Simple Logging Facade for Java (SLF4J) QOS.ch MIT -Used by: [helidon-logging-slf4j, helidon-lra-coordinator-server, helidon-messaging-kafka, helidon-microprofile-grpc-metrics, helidon-microprofile-grpc-server, helidon-tracing-jaeger] +Used by: [helidon-logging-slf4j, helidon-lra-coordinator-server, helidon-messaging-kafka, helidon-microprofile-grpc-metrics, helidon-microprofile-grpc-server, helidon-tracing-providers-jaeger] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Simple Logging Facade for Java (SLF4J ) @@ -3040,7 +3040,7 @@ See full text at the bottom of this document for license: EPL-2.0-plus-GPLv2-CPE =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Zipkin Reporter Java The OpenZipkin Authors Apache 2.0 -Used by: [helidon-tracing-zipkin] +Used by: [helidon-tracing--providers-zipkin] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Zipkin Reporter for Java Zipkin Sender: URLConnection (io.zipkin.reporter2:zipkin-sender-urlconnection) @@ -7009,7 +7009,7 @@ decompression for Java., which can be obtained at: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= opentelemetry-api OpenTelemetry authors Apache 2.0 -Used by: [helidon-tracing-opentelemetry] +Used by: [helidon-tracing-providers-opentelemetry] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= OpenTelemetry Java (io.opentelemetry:opentelemetry-api) Copyright (C) 2008 The Guava Authors @@ -7032,7 +7032,7 @@ Apache License 2.0 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= opentelemetry-exporter-jaeger OpenTelemetry authors Apache 2.0 -Used by: [helidon-microprofile-tracing, helidon-tracing-jaeger, helidon-tracing-opentelemetry] +Used by: [helidon-microprofile-tracing, helidon-tracing-providers-jaeger, helidon-tracing-providers-opentelemetry] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= OpenTelemetry Java (io.opentelemetry:opentelemetry-exporter-jaeger) Copyright The OpenTelemetry Authors @@ -7134,7 +7134,7 @@ Fourth Party Dependencies =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= opentelemetry-extension-trace-propagators OpenTelemetry authors Apache 2.0 -Used by: [helidon-tracing-opentelemetry] +Used by: [helidon-tracing-providers-opentelemetry] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= OpenTelemetry Java (io.opentelemetry:opentelemetry-extension-trace-propagators) Copyright The OpenTelemetry Authors @@ -7162,7 +7162,7 @@ Fourth Party Dependencies =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= opentelemetry-sdk OpenTelemetry authors Apache 2.0 -Used by: [helidon-tracing-jaeger] +Used by: [helidon-tracing-providers-jaeger] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= OpenTelemetry Java (io.opentelemetry:opentelemetry-sdk) Copyright The OpenTelemetry Authors diff --git a/archetypes/helidon/src/main/archetype/common/observability.xml b/archetypes/helidon/src/main/archetype/common/observability.xml index c963779c245..c0b2d7d6207 100644 --- a/archetypes/helidon/src/main/archetype/common/observability.xml +++ b/archetypes/helidon/src/main/archetype/common/observability.xml @@ -346,8 +346,8 @@ curl -s -X GET http://localhost:8080/health - io.helidon.tracing - helidon-tracing-jaeger + io.helidon.tracing.providers + helidon-tracing-providers-jaeger @@ -366,8 +366,8 @@ curl -s -X GET http://localhost:8080/health - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin diff --git a/docs/includes/tracing/tracer-jaeger.adoc b/docs/includes/tracing/tracer-jaeger.adoc index 2d9313341e6..20f34eb1dc5 100644 --- a/docs/includes/tracing/tracer-jaeger.adoc +++ b/docs/includes/tracing/tracer-jaeger.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2019, 2022 Oracle and/or its affiliates. + Copyright (c) 2019, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ include::{rootdir}/includes/dependencies.adoc[] ---- io.helidon.tracing - helidon-tracing-jaeger + helidon-tracing-providers-jaeger ---- // end::jaeger-dependency[] diff --git a/docs/includes/tracing/tracer-zipkin.adoc b/docs/includes/tracing/tracer-zipkin.adoc index 7ddfd33e72c..9bfdaf7a056 100644 --- a/docs/includes/tracing/tracer-zipkin.adoc +++ b/docs/includes/tracing/tracer-zipkin.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2019, 2022 Oracle and/or its affiliates. + Copyright (c) 2019, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ include::{rootdir}/includes/dependencies.adoc[] [source,xml] ---- - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- // end::zipkin-dependency[] diff --git a/docs/mp/guides/tracing.adoc b/docs/mp/guides/tracing.adoc index 813e43d1b31..93a6eaae072 100644 --- a/docs/mp/guides/tracing.adoc +++ b/docs/mp/guides/tracing.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2019, 2022 Oracle and/or its affiliates. + Copyright (c) 2019, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -130,8 +130,8 @@ default host and port, `localhost:9411`. .Add the following dependency to `pom.xml`: ---- - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- @@ -478,8 +478,8 @@ cd helidon-quickstart-mp-2 .Add the following dependency to `pom.xml`: ---- - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- diff --git a/docs/mp/tracing.adoc b/docs/mp/tracing.adoc index c817744ebce..bf85b5e01f4 100644 --- a/docs/mp/tracing.adoc +++ b/docs/mp/tracing.adoc @@ -207,8 +207,8 @@ default host and port, `localhost:9411`. .Add the following dependency to `pom.xml`: ---- - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- @@ -560,8 +560,8 @@ cd helidon-quickstart-mp-2 .Add the following dependency to `pom.xml`: ---- - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- diff --git a/docs/se/guides/tracing.adoc b/docs/se/guides/tracing.adoc index 50551ee16f2..542f49bd7af 100644 --- a/docs/se/guides/tracing.adoc +++ b/docs/se/guides/tracing.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2019, 2022 Oracle and/or its affiliates. + Copyright (c) 2019, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -133,8 +133,8 @@ default host and port, `localhost:9411`. helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- @@ -352,8 +352,8 @@ cd helidon-quickstart-se-2 helidon-tracing - io.helidon.tracing - helidon-tracing-zipkin + io.helidon.tracing.providers + helidon-tracing-providers-zipkin ---- diff --git a/etc/HELIDON_THIRD_PARTY_LICENSES.xml b/etc/HELIDON_THIRD_PARTY_LICENSES.xml index d5992c56725..0b41838dc22 100644 --- a/etc/HELIDON_THIRD_PARTY_LICENSES.xml +++ b/etc/HELIDON_THIRD_PARTY_LICENSES.xml @@ -8,7 +8,7 @@ The OpenZipkin Authors Apache 2.0 - helidon-tracing-zipkin + helidon-tracing-providers-zipkin Zipkin OpenTracing Brave (io.opentracing.brave:brave-opentracing) Copyright 2016-2020 The OpenZipkin Authors @@ -3073,9 +3073,9 @@ Fourth Party Runtime Dependencies helidon-integrations-common-rest helidon-reactive-dbclient-tracing helidon-security-integration-jersey - helidon-tracing-opentracing + helidon-tracing-providers-opentracing helidon-tracing-tracer-resolver - helidon-tracing-zipkin + helidon-tracing-providers-zipkin opentracing-util: 0.33.0, Apache 2.0 opentracing-mock: 0.33.0, Apache 2.0 @@ -3146,7 +3146,7 @@ See full text at the bottom of this document for license: Apache-2.0 helidon-messaging-kafka helidon-microprofile-grpc-metrics helidon-microprofile-grpc-server - helidon-tracing-jaeger + helidon-tracing-providers-jaeger Simple Logging Facade for Java (SLF4J ) @@ -3442,7 +3442,7 @@ See full text at the bottom of this document for license: EPL-2.0-plus-GPLv2-CPE The OpenZipkin Authors Apache 2.0 - helidon-tracing-zipkin + helidon-tracing-providers-zipkin Zipkin Reporter for Java Zipkin Sender: URLConnection (io.zipkin.reporter2:zipkin-sender-urlconnection) @@ -7584,7 +7584,7 @@ decompression for Java., which can be obtained at: OpenTelemetry authors Apache 2.0 - helidon-tracing-opentelemetry + helidon-tracing-providers-opentelemetry OpenTelemetry Java (io.opentelemetry:opentelemetry-api) Copyright (C) 2008 The Guava Authors @@ -7613,8 +7613,8 @@ Apache License 2.0 Apache 2.0 helidon-microprofile-tracing - helidon-tracing-jaeger - helidon-tracing-opentelemetry + helidon-tracing-providers-jaeger + helidon-tracing-providers-opentelemetry OpenTelemetry Java (io.opentelemetry:opentelemetry-exporter-jaeger) Copyright The OpenTelemetry Authors @@ -7721,7 +7721,7 @@ Fourth Party Dependencies OpenTelemetry authors Apache 2.0 - helidon-tracing-opentelemetry + helidon-tracing-providers-opentelemetry OpenTelemetry Java (io.opentelemetry:opentelemetry-extension-trace-propagators) Copyright The OpenTelemetry Authors @@ -7754,7 +7754,7 @@ Fourth Party Dependencies OpenTelemetry authors Apache 2.0 - helidon-tracing-jaeger + helidon-tracing-providers-jaeger OpenTelemetry Java (io.opentelemetry:opentelemetry-sdk) Copyright The OpenTelemetry Authors diff --git a/tracing/README.md b/tracing/README.md index b8977cb88a0..ae564a8d383 100644 --- a/tracing/README.md +++ b/tracing/README.md @@ -5,8 +5,8 @@ Module `helidon-tracing` defines tracing API and SPI that is used throughout Hel As we need to support both OpenTracing and OpenTelemetry tracing, this abstraction is required to keep tracing an integral part of Helidon. -Module `helidon-tracing-opentracing` adds support for opentracing based tracers (such as Zipkin). -Module `helidon-tracing-opentelemetry` adds support for opentelemetry based tracers (such as Jaeger). +Module `helidon-tracing-providers-opentracing` adds support for opentracing based tracers (such as Zipkin). +Module `helidon-tracing-providers-opentelemetry` adds support for opentelemetry based tracers (such as Jaeger). # Usage ## Usage In Helidon MP @@ -24,7 +24,7 @@ Example of pom.xml dependencies: io.helidon.tracing - helidon-tracing-zipkin + helidon-tracing-providers-zipkin ``` @@ -53,7 +53,7 @@ pom.xml: io.helidon.tracing - helidon-tracing-zipkin + helidon-tracing-providers-zipkin ``` @@ -178,7 +178,7 @@ tracer and of server-side filters that register context for client calls and tra request (unless explicitly disabled using configuration) This module is located in /microprofile/tracing -## Module `helidon-tracing-zipkin` +## Module `helidon-tracing-providers-zipkin` Integration with Zipkin (https://zipkin.io/). Easiest approach is to use a docker image `zipkin` that, by default, runs on the expected hostname and port. From 86ed5982537fa64e85e8f9eecaab71c7a917c0c8 Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Mon, 31 Jul 2023 13:27:51 +0300 Subject: [PATCH 5/7] Fix JavaDoc Signed-off-by: Dmitry Aleksandrov --- .../helidon/tracing/providers/opentracing/package-info.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java index 83a8fbdcf9f..9fa54f75f5f 100644 --- a/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java +++ b/tracing/providers/opentracing/src/main/java/io/helidon/tracing/providers/opentracing/package-info.java @@ -15,8 +15,8 @@ */ /** - * Open Tracing support that plugs into the {@link io.helidon.tracing.providers.TracerBuilder} SPI and provides - * a {@link io.helidon.tracing.providers.Tracer} implementation. + * Open Tracing support that plugs into the {@link io.helidon.tracing.TracerBuilder} SPI and provides + * a {@link io.helidon.tracing.Tracer} implementation. * * @see io.helidon.tracing.providers.opentracing.OpenTracing */ From cd97069ea6246a0db777bc3269d092d3ca378607 Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Mon, 31 Jul 2023 14:17:43 +0300 Subject: [PATCH 6/7] Minor clean up Signed-off-by: Dmitry Aleksandrov --- .../io/helidon/webserver/examples/opentracing/Main.java | 2 +- .../java/io/helidon/tests/integration/webclient/Main.java | 2 +- .../integration/webclient/TracingPropagationTest.java | 2 +- .../helidon/tests/integration/webclient/TracingTest.java | 2 +- .../tests/integration/zipkin/mp22/ZipkinMp22Test.java | 4 ++-- tracing/zipkin/src/main/java/module-info.java | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/webserver/opentracing/src/main/java/io/helidon/webserver/examples/opentracing/Main.java b/examples/webserver/opentracing/src/main/java/io/helidon/webserver/examples/opentracing/Main.java index 38b4b6ec800..a069f0e3353 100644 --- a/examples/webserver/opentracing/src/main/java/io/helidon/webserver/examples/opentracing/Main.java +++ b/examples/webserver/opentracing/src/main/java/io/helidon/webserver/examples/opentracing/Main.java @@ -28,7 +28,7 @@ * The application uses Open Tracing and sends the collected data to ZipKin. * * @see io.helidon.tracing.TracerBuilder - * @see io.helidon.tracing.zipkin.ZipkinTracerBuilder + * @see io.helidon.tracing.providers.zipkin.ZipkinTracerBuilder */ public final class Main { diff --git a/tests/integration/webclient/src/main/java/io/helidon/tests/integration/webclient/Main.java b/tests/integration/webclient/src/main/java/io/helidon/tests/integration/webclient/Main.java index 656142319a7..d1d74ac0722 100644 --- a/tests/integration/webclient/src/main/java/io/helidon/tests/integration/webclient/Main.java +++ b/tests/integration/webclient/src/main/java/io/helidon/tests/integration/webclient/Main.java @@ -23,7 +23,7 @@ import io.helidon.nima.webserver.http.HttpRouting; import io.helidon.nima.webserver.tracing.TracingFeature; import io.helidon.security.integration.nima.SecurityFeature; -import io.helidon.tracing.opentracing.OpenTracing; +import io.helidon.tracing.providers.opentracing.OpenTracing; import io.opentracing.Tracer; diff --git a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingPropagationTest.java b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingPropagationTest.java index d3f32726647..6ce3fb12cf1 100644 --- a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingPropagationTest.java +++ b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingPropagationTest.java @@ -32,7 +32,7 @@ import io.helidon.nima.webclient.tracing.WebClientTracing; import io.helidon.nima.webserver.WebServerConfig; import io.helidon.tracing.Tracer; -import io.helidon.tracing.opentracing.OpenTracing; +import io.helidon.tracing.providers.opentracing.OpenTracing; import io.opentracing.mock.MockSpan; import io.opentracing.mock.MockTracer; diff --git a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingTest.java b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingTest.java index 428a4558f06..ba2ef97877f 100644 --- a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingTest.java +++ b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/TracingTest.java @@ -27,7 +27,7 @@ import io.helidon.nima.webclient.tracing.WebClientTracing; import io.helidon.nima.webserver.WebServer; import io.helidon.tracing.Tracer; -import io.helidon.tracing.opentracing.OpenTracing; +import io.helidon.tracing.providers.opentracing.OpenTracing; import io.opentracing.mock.MockSpan; import io.opentracing.mock.MockTracer; diff --git a/tests/integration/zipkin-mp-2.2/src/test/java/io/helidon/tests/integration/zipkin/mp22/ZipkinMp22Test.java b/tests/integration/zipkin-mp-2.2/src/test/java/io/helidon/tests/integration/zipkin/mp22/ZipkinMp22Test.java index 8bc7598b4be..6ba64c55c46 100644 --- a/tests/integration/zipkin-mp-2.2/src/test/java/io/helidon/tests/integration/zipkin/mp22/ZipkinMp22Test.java +++ b/tests/integration/zipkin-mp-2.2/src/test/java/io/helidon/tests/integration/zipkin/mp22/ZipkinMp22Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. + * Copyright (c) 2019, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ void testZipkin() { // global tracer wraps the tracer in its own instance ScopeManager scopeManager = GlobalTracer.get().scopeManager(); // and this class is not public - assertThat(scopeManager.getClass().getName(), startsWith("io.helidon.tracing.zipkin")); + assertThat(scopeManager.getClass().getName(), startsWith("io.helidon.tracing.providers.zipkin")); } @Test diff --git a/tracing/zipkin/src/main/java/module-info.java b/tracing/zipkin/src/main/java/module-info.java index c95d7c2542b..22308094c91 100644 --- a/tracing/zipkin/src/main/java/module-info.java +++ b/tracing/zipkin/src/main/java/module-info.java @@ -25,13 +25,13 @@ in = {HelidonFlavor.MP, HelidonFlavor.SE, HelidonFlavor.NIMA}, path = {"Tracing", "Zipkin"} ) -module io.helidon.tracing.zipkin { +module io.helidon.tracing.providers.zipkin { requires static io.helidon.common.features.api; requires io.helidon.common; requires io.helidon.common.config; requires io.helidon.tracing; - requires io.helidon.tracing.opentracing; + requires io.helidon.tracing.providers.opentracing; requires static io.helidon.config.metadata; requires io.opentracing.util; @@ -43,7 +43,7 @@ requires io.opentracing.noop; requires io.opentracing.api; - exports io.helidon.tracing.zipkin; + exports io.helidon.tracing.providers.zipkin; - provides io.helidon.tracing.opentracing.spi.OpenTracingProvider with io.helidon.tracing.zipkin.ZipkinTracerProvider; + provides io.helidon.tracing.providers.opentracing.spi.OpenTracingProvider with io.helidon.tracing.providers.zipkin.ZipkinTracerProvider; } From 1a7b1fcf3d7208e781c47bd90d341764d089abf9 Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Mon, 31 Jul 2023 17:25:28 +0300 Subject: [PATCH 7/7] Applied comments Signed-off-by: Dmitry Aleksandrov --- tracing/providers/jaeger/pom.xml | 2 +- .../providers/jaeger/JaegerTracerBuilder.java | 18 +++---- .../jaeger/src/main/java/module-info.java | 9 ++-- tracing/providers/opentelemetry/pom.xml | 2 +- .../OpenTelemetryTracerProvider.java | 2 +- .../providers/opentelemetry/package-info.java | 2 +- .../src/main/java/module-info.java | 6 +-- .../opentracing/etc/spotbugs/exclude.xml | 2 +- tracing/providers/opentracing/pom.xml | 2 +- .../providers/opentracing/OpenTracing.java | 2 +- .../OpenTracingTracerProvider.java | 2 +- .../src/main/java/module-info.java | 9 ++-- tracing/providers/zipkin/pom.xml | 2 +- .../providers/zipkin/ZipkinTracer.java | 3 +- .../zipkin/src/main/java/module-info.java | 10 ++++ .../native-image.properties | 2 +- .../src/main/java/module-info.java | 3 +- tracing/zipkin/src/main/java/module-info.java | 49 ------------------- 18 files changed, 41 insertions(+), 86 deletions(-) delete mode 100644 tracing/zipkin/src/main/java/module-info.java diff --git a/tracing/providers/jaeger/pom.xml b/tracing/providers/jaeger/pom.xml index 43c361a3eaf..224afbff95a 100644 --- a/tracing/providers/jaeger/pom.xml +++ b/tracing/providers/jaeger/pom.xml @@ -26,7 +26,7 @@ helidon-tracing-providers-jaeger - Helidon Tracing Jaeger + Helidon Tracing Providers Jaeger Integration with Jaeger tracing diff --git a/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java index 200d6f41984..a9367541c2d 100644 --- a/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java +++ b/tracing/providers/jaeger/src/main/java/io/helidon/tracing/providers/jaeger/JaegerTracerBuilder.java @@ -52,11 +52,11 @@ import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; /** - * The JaegerTracerBuilder is a convenience builder for {@link Tracer} to use with Jaeger. + * The JaegerTracerBuilder is a convenience builder for {@link io.helidon.tracing.Tracer} to use with Jaeger. *

* Unless You want to explicitly depend on Jaeger in Your code, please - * use {@link TracerBuilder#create(String)} or - * {@link TracerBuilder#create(io.helidon.common.config.Config)} that is abstracted. + * use {@link io.helidon.tracing.TracerBuilder#create(String)} or + * {@link io.helidon.tracing.TracerBuilder#create(io.helidon.common.config.Config)} that is abstracted. *

* The Jaeger tracer uses environment variables and system properties to override the defaults. * Except for {@code protocol} and {@code service} these are honored, unless overridden in configuration @@ -131,17 +131,17 @@ * * {@code tags} *   - * see {@link TracerBuilder} + * see {@link io.helidon.tracing.TracerBuilder} * * * {@code boolean-tags} *   - * see {@link TracerBuilder} + * see {@link io.helidon.tracing.TracerBuilder} * * * {@code int-tags} *   - * see {@link TracerBuilder} + * see {@link io.helidon.tracing.TracerBuilder} * * */ @@ -177,7 +177,7 @@ protected JaegerTracerBuilder() { } /** - * Get a Jaeger {@link Tracer } builder for processing tracing data of a service with a given name. + * Get a Jaeger {@link io.helidon.tracing.Tracer } builder for processing tracing data of a service with a given name. * * @param serviceName name of the service that will be using the tracer. * @return {@code Tracer} builder for Jaeger. @@ -193,7 +193,7 @@ public static JaegerTracerBuilder forService(String serviceName) { * * @param config configuration to load this builder from * @return a new builder instance. - * @see JaegerTracerBuilder#config(io.helidon.common.config.Config) + * @see io.helidon.tracing.providers.jaeger.JaegerTracerBuilder#config(io.helidon.common.config.Config) */ public static JaegerTracerBuilder create(Config config) { return create().config(config); @@ -408,7 +408,7 @@ public JaegerTracerBuilder addPropagation(PropagationFormat propagationFormat) { } /** - * Builds the {@link Tracer} for Jaeger based on the configured parameters. + * Builds the {@link io.helidon.tracing.Tracer} for Jaeger based on the configured parameters. * * @return the tracer */ diff --git a/tracing/providers/jaeger/src/main/java/module-info.java b/tracing/providers/jaeger/src/main/java/module-info.java index 31c5f51ab58..7a2dd82b341 100644 --- a/tracing/providers/jaeger/src/main/java/module-info.java +++ b/tracing/providers/jaeger/src/main/java/module-info.java @@ -16,9 +16,6 @@ import io.helidon.common.features.api.Feature; import io.helidon.common.features.api.HelidonFlavor; -import io.helidon.tracing.providers.jaeger.JaegerDataPropagationProvider; -import io.helidon.tracing.providers.jaeger.JaegerTracerProvider; -import io.helidon.tracing.spi.TracerProvider; /** * Jaeger tracing support. @@ -47,7 +44,9 @@ exports io.helidon.tracing.providers.jaeger; - provides TracerProvider with JaegerTracerProvider; - provides io.helidon.common.context.spi.DataPropagationProvider with JaegerDataPropagationProvider; + provides io.helidon.tracing.spi.TracerProvider + with io.helidon.tracing.providers.jaeger.JaegerTracerProvider; + provides io.helidon.common.context.spi.DataPropagationProvider + with io.helidon.tracing.providers.jaeger.JaegerDataPropagationProvider; } diff --git a/tracing/providers/opentelemetry/pom.xml b/tracing/providers/opentelemetry/pom.xml index 7d14d56acb7..66c645892d4 100644 --- a/tracing/providers/opentelemetry/pom.xml +++ b/tracing/providers/opentelemetry/pom.xml @@ -25,7 +25,7 @@ helidon-tracing-providers-opentelemetry - Helidon Tracing Open Telemetry + Helidon Tracing Providers Open Telemetry diff --git a/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java index 038456fd792..6ec1f30a272 100644 --- a/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/OpenTelemetryTracerProvider.java @@ -34,7 +34,7 @@ import io.opentelemetry.api.OpenTelemetry; /** - * Service loader provider implementation for {@link TracerProvider}. + * Service loader provider implementation for {@link io.helidon.tracing.spi.TracerProvider}. */ @Weight(Weighted.DEFAULT_WEIGHT - 50) public class OpenTelemetryTracerProvider implements TracerProvider { diff --git a/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java index b0cae627c0b..a81f11ef3b5 100644 --- a/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java +++ b/tracing/providers/opentelemetry/src/main/java/io/helidon/tracing/providers/opentelemetry/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Oracle and/or its affiliates. + * Copyright (c) 2022, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tracing/providers/opentelemetry/src/main/java/module-info.java b/tracing/providers/opentelemetry/src/main/java/module-info.java index 6b14def1774..f3639ec038a 100644 --- a/tracing/providers/opentelemetry/src/main/java/module-info.java +++ b/tracing/providers/opentelemetry/src/main/java/module-info.java @@ -14,9 +14,6 @@ * limitations under the License. */ -import io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; -import io.helidon.tracing.spi.TracerProvider; - /** * Open telemetry support for Helidon tracing. */ @@ -35,5 +32,6 @@ exports io.helidon.tracing.providers.opentelemetry; - provides TracerProvider with OpenTelemetryTracerProvider; + provides io.helidon.tracing.spi.TracerProvider + with io.helidon.tracing.providers.opentelemetry.OpenTelemetryTracerProvider; } \ No newline at end of file diff --git a/tracing/providers/opentracing/etc/spotbugs/exclude.xml b/tracing/providers/opentracing/etc/spotbugs/exclude.xml index e32a317e920..fc916387c64 100644 --- a/tracing/providers/opentracing/etc/spotbugs/exclude.xml +++ b/tracing/providers/opentracing/etc/spotbugs/exclude.xml @@ -1,7 +1,7 @@