diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java index bc6bf553f91d26..cb5e8024bcb56e 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryContinuousTestingTest.java @@ -7,9 +7,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.traces.TracerRouterUT; import io.quarkus.test.ContinuousTestingTestUtils; import io.quarkus.test.ContinuousTestingTestUtils.TestStatus; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDestroyerTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDestroyerTest.java index b8b72ee86db391..c4582b0a115904 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDestroyerTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDestroyerTest.java @@ -10,8 +10,8 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.opentelemetry.OpenTelemetryDestroyer; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusDevModeTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java index b32aab8c4acac2..68cf17135bd1c5 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevModeTest.java @@ -7,9 +7,9 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.opentelemetry.deployment.common.HelloResource; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.ContinuousTestingTestUtils; import io.quarkus.test.QuarkusDevModeTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevServicesDatasourcesTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevServicesDatasourcesTest.java index 2eb1130ae02af5..48b33e0d9ea27b 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevServicesDatasourcesTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryDevServicesDatasourcesTest.java @@ -27,8 +27,8 @@ import io.agroal.api.AgroalDataSource; import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusDevModeTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryMDCTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryMDCTest.java index 572a020cb89b74..4f8ad16b6a67b0 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryMDCTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryMDCTest.java @@ -2,7 +2,7 @@ import static io.opentelemetry.api.trace.SpanKind.INTERNAL; import static io.opentelemetry.api.trace.SpanKind.SERVER; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -28,10 +28,10 @@ import io.opentelemetry.context.Scope; import io.opentelemetry.sdk.trace.data.SpanData; import io.quarkus.arc.Unremovable; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; @@ -39,15 +39,16 @@ public class OpenTelemetryMDCTest { @RegisterExtension static final QuarkusUnitTest unitTest = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar + .addPackage(TestSpanExporter.class.getPackage()) .addClass(MdcEntry.class) .addClass(TestMdcCapturer.class) .addClass(TestResource.class) - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, - InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties"); @Inject diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryResourceTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryResourceTest.java index f1ee913e35cd66..e036c550672da1 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryResourceTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryResourceTest.java @@ -1,7 +1,7 @@ package io.quarkus.opentelemetry.deployment; import static io.opentelemetry.api.trace.SpanKind.SERVER; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -15,6 +15,7 @@ import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -22,10 +23,8 @@ import io.opentelemetry.api.metrics.Meter; import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import io.smallrye.config.SmallRyeConfig; @@ -34,8 +33,7 @@ public class OpenTelemetryResourceTest { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest().setArchiveProducer( () -> ShrinkWrap.create(JavaArchive.class) - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, - InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(InMemoryExporter.class.getPackage()) .addAsResource("resource-config/application.properties", "application.properties") .addAsResource( "META-INF/services-config/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider", @@ -46,9 +44,12 @@ public class OpenTelemetryResourceTest { @Inject SmallRyeConfig config; @Inject - TestSpanExporter spanExporter; - @Inject - InMemoryMetricExporter metricExporter; + InMemoryExporter exporter; + + @BeforeEach + void setup() { + exporter.reset(); + } @Test void resource() { @@ -57,7 +58,7 @@ void resource() { .statusCode(200) .body(is("hello")); - List spans = spanExporter.getFinishedSpanItems(1); + List spans = exporter.getSpanExporter().getFinishedSpanItems(1); final SpanData server = getSpanByKindAndParentId(spans, SERVER, "0000000000000000"); assertEquals("GET /hello", server.getName()); @@ -66,8 +67,8 @@ void resource() { server.getResource().getAttribute(AttributeKey.stringKey("service.instance.id"))); assertNotNull(server.getResource().getAttribute(AttributeKey.stringKey("host.name"))); - metricExporter.assertCountAtLeast(1); - List finishedMetricItems = metricExporter.getFinishedMetricItems(); + exporter.getMetricExporter().assertCountAtLeast(1); + List finishedMetricItems = exporter.getMetricExporter().getFinishedMetricItems(); } @Path("/hello") diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameAppNameTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameAppNameTest.java index e6c3d688f0ba16..b1d6c1eba8ccc9 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameAppNameTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameAppNameTest.java @@ -5,8 +5,8 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetryServiceNameAppNameTest extends OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameBaseTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameBaseTest.java index 1b9f3f3d6cee4b..02367d49584d29 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameBaseTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameBaseTest.java @@ -1,7 +1,7 @@ package io.quarkus.opentelemetry.deployment; import static io.opentelemetry.api.trace.SpanKind.SERVER; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -15,7 +15,7 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; import io.restassured.RestAssured; public abstract class OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedResourceWinsTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedResourceWinsTest.java index cb40e024aeab7e..2660e6e8e630d2 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedResourceWinsTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedResourceWinsTest.java @@ -4,8 +4,8 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetryServiceNameCombinedResourceWinsTest extends OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedServiceWinsTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedServiceWinsTest.java index 39a3ad1aae3bae..8671ff4a74caf8 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedServiceWinsTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameCombinedServiceWinsTest.java @@ -4,8 +4,8 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetryServiceNameCombinedServiceWinsTest extends OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameNoResourceAttrsTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameNoResourceAttrsTest.java index c693d9961fe862..72cc466ccaae5b 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameNoResourceAttrsTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameNoResourceAttrsTest.java @@ -4,8 +4,8 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetryServiceNameNoResourceAttrsTest extends OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameResourceAttrTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameResourceAttrTest.java index c980f13dc641bc..361922d365feec 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameResourceAttrTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetryServiceNameResourceAttrTest.java @@ -4,8 +4,8 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetryServiceNameResourceAttrTest extends OpenTelemetryServiceNameBaseTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryExporter.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryExporter.java new file mode 100644 index 00000000000000..8ca0fcd8a3be72 --- /dev/null +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryExporter.java @@ -0,0 +1,49 @@ +package io.quarkus.opentelemetry.deployment.common.exporter; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Any; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; + +import io.quarkus.arc.Unremovable; + +@Unremovable +@ApplicationScoped +public class InMemoryExporter { + + @Inject + @Any + Instance testSpanExporter; + + @Inject + @Any + Instance inMemoryMetricExporter; + + @Inject + @Any + Instance inMemoryLogRecordExporter; + + public void reset() { + if (testSpanExporter.isResolvable()) { + testSpanExporter.get().reset(); + } + if (inMemoryMetricExporter.isResolvable()) { + inMemoryMetricExporter.get().reset(); + } + if (inMemoryLogRecordExporter.isResolvable()) { + inMemoryLogRecordExporter.get().reset(); + } + } + + public TestSpanExporter getSpanExporter() { + return testSpanExporter.get(); + } + + public InMemoryMetricExporter getMetricExporter() { + return inMemoryMetricExporter.get(); + } + + public InMemoryLogRecordExporter getLogRecordExporter() { + return inMemoryLogRecordExporter.get(); + } +} diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporter.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporter.java similarity index 97% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporter.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporter.java index e07f6cfd506ccf..c5ba99a9fc7801 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporter.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporter.java @@ -1,4 +1,4 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import static java.util.concurrent.TimeUnit.SECONDS; import static org.assertj.core.api.Assertions.assertThat; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporterProvider.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporterProvider.java similarity index 83% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporterProvider.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporterProvider.java index 9895a32ea9465b..f3ecf012878ea2 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryLogRecordExporterProvider.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryLogRecordExporterProvider.java @@ -1,11 +1,10 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import jakarta.enterprise.inject.spi.CDI; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider; import io.opentelemetry.sdk.logs.export.LogRecordExporter; -import io.opentelemetry.sdk.testing.exporter.InMemoryLogRecordExporter; public class InMemoryLogRecordExporterProvider implements ConfigurableLogRecordExporterProvider { @Override diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporter.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporter.java similarity index 99% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporter.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporter.java index 8036cd087add89..64774ae5097b96 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporter.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporter.java @@ -1,4 +1,4 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import static java.util.concurrent.TimeUnit.SECONDS; import static java.util.stream.Collectors.joining; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporterProvider.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporterProvider.java similarity index 90% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporterProvider.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporterProvider.java index 6927ccb5ef4aed..0eaba72cdd6dad 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/InMemoryMetricExporterProvider.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/InMemoryMetricExporterProvider.java @@ -1,4 +1,4 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import jakarta.enterprise.inject.spi.CDI; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporter.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporter.java similarity index 97% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporter.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporter.java index 533e3ca62cd5bf..573816c3ed9d04 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporter.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporter.java @@ -1,4 +1,4 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import static java.util.concurrent.TimeUnit.SECONDS; import static java.util.stream.Collectors.toList; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporterProvider.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporterProvider.java similarity index 90% rename from extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporterProvider.java rename to extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporterProvider.java index be3be5ecbb0c2a..945149e9dc1325 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/TestSpanExporterProvider.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/common/exporter/TestSpanExporterProvider.java @@ -1,4 +1,4 @@ -package io.quarkus.opentelemetry.deployment.common; +package io.quarkus.opentelemetry.deployment.common.exporter; import jakarta.enterprise.inject.spi.CDI; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GraphQLOpenTelemetryTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GraphQLOpenTelemetryTest.java index 208fa62f82952f..5cfbe711d53243 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GraphQLOpenTelemetryTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GraphQLOpenTelemetryTest.java @@ -5,7 +5,7 @@ import static io.opentelemetry.semconv.HttpAttributes.HTTP_RESPONSE_STATUS_CODE; import static io.opentelemetry.semconv.HttpAttributes.HTTP_ROUTE; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -47,8 +47,8 @@ import io.opentelemetry.instrumentation.annotations.WithSpan; import io.opentelemetry.sdk.trace.data.SpanData; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenInstrumentationDisabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenInstrumentationDisabledTest.java index 6b1a4af1b4c82b..2ce9752b2e1f0a 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenInstrumentationDisabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenInstrumentationDisabledTest.java @@ -2,7 +2,7 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.trace.SpanKind.INTERNAL; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.junit.jupiter.api.Assertions.assertEquals; import java.time.Duration; @@ -30,10 +30,10 @@ import io.quarkus.opentelemetry.deployment.HelloRequest; import io.quarkus.opentelemetry.deployment.HelloRequestOrBuilder; import io.quarkus.opentelemetry.deployment.MutinyGreeterGrpc; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.smallrye.mutiny.Uni; @@ -42,8 +42,7 @@ public class GrpcOpenInstrumentationDisabledTest { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest() .withApplicationRoot(root -> root - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) .addClasses(HelloService.class) .addClasses(GreeterGrpc.class, MutinyGreeterGrpc.class, Greeter.class, GreeterBean.class, GreeterClient.class, @@ -52,7 +51,9 @@ public class GrpcOpenInstrumentationDisabledTest { .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties") .overrideConfigKey("quarkus.grpc.clients.hello.host", "localhost") .overrideConfigKey("quarkus.grpc.clients.hello.port", "9001") diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenTelemetryTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenTelemetryTest.java index 89371d8692ff49..ae4fa1eafb10fe 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenTelemetryTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/GrpcOpenTelemetryTest.java @@ -10,7 +10,7 @@ import static io.opentelemetry.semconv.SemanticAttributes.RPC_SYSTEM; import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS; import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static io.quarkus.opentelemetry.runtime.config.build.OTelBuildConfig.INSTRUMENTATION_NAME; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -58,11 +58,10 @@ import io.quarkus.opentelemetry.deployment.StreamingClient; import io.quarkus.opentelemetry.deployment.StreamingGrpc; import io.quarkus.opentelemetry.deployment.StreamingProto; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.smallrye.common.annotation.Blocking; import io.smallrye.mutiny.Multi; @@ -71,8 +70,7 @@ public class GrpcOpenTelemetryTest { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, SemconvResolver.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) .addClasses(HelloService.class) .addClasses(GreeterGrpc.class, MutinyGreeterGrpc.class, Greeter.class, GreeterBean.class, GreeterClient.class, @@ -85,7 +83,9 @@ public class GrpcOpenTelemetryTest { .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties") .overrideConfigKey("quarkus.grpc.clients.greeter.host", "localhost") .overrideConfigKey("quarkus.grpc.clients.greeter.port", "9001") diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/RestClientOpenTelemetryTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/RestClientOpenTelemetryTest.java index 2c42cb42e89d85..b64bb7b955b866 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/RestClientOpenTelemetryTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/RestClientOpenTelemetryTest.java @@ -10,7 +10,7 @@ import static io.opentelemetry.semconv.UrlAttributes.URL_FULL; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertTarget; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -36,23 +36,25 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.test.common.http.TestHTTPResource; public class RestClientOpenTelemetryTest { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest().withApplicationRoot((jar) -> jar - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, SemconvResolver.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) + .addClasses(SemconvResolver.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties") .overrideConfigKey("quarkus.rest-client.client.url", "${test.url}"); diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxClientOpenTelemetryTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxClientOpenTelemetryTest.java index 6e2b092a30fac1..dba76e4c4a4894 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxClientOpenTelemetryTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxClientOpenTelemetryTest.java @@ -10,7 +10,7 @@ import static io.opentelemetry.semconv.UrlAttributes.URL_FULL; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertTarget; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static java.util.stream.Collectors.toSet; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -29,11 +29,11 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.runtime.StartupEvent; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.test.common.http.TestHTTPResource; @@ -49,12 +49,14 @@ public class VertxClientOpenTelemetryTest { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, SemconvResolver.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) + .addClasses(SemconvResolver.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties"); @Inject diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxEventBusInstrumentationDisabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxEventBusInstrumentationDisabledTest.java index 8956b578799703..39a8e8e9b186ca 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxEventBusInstrumentationDisabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxEventBusInstrumentationDisabledTest.java @@ -2,7 +2,7 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.trace.SpanKind.INTERNAL; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -20,9 +20,9 @@ import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.vertx.ConsumeEvent; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxHttpInstrumentationDisabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxHttpInstrumentationDisabledTest.java index eb8cc3eb053751..2702bbb01c559a 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxHttpInstrumentationDisabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxHttpInstrumentationDisabledTest.java @@ -2,7 +2,7 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.trace.SpanKind.INTERNAL; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -20,9 +20,9 @@ import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import io.vertx.core.eventbus.EventBus; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryForwardedTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryForwardedTest.java index b9f70c472a4a35..543180671045bd 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryForwardedTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryForwardedTest.java @@ -3,7 +3,7 @@ import static io.opentelemetry.api.trace.SpanKind.SERVER; import static io.opentelemetry.semconv.ClientAttributes.CLIENT_ADDRESS; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import java.util.List; @@ -15,12 +15,12 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; @@ -28,13 +28,14 @@ public class VertxOpenTelemetryForwardedTest { @RegisterExtension static final QuarkusUnitTest unitTest = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar - .addClass(TracerRouter.class) - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, SemconvResolver.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) + .addClasses(TracerRouter.class, SemconvResolver.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties"); @Inject diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryTest.java index 0468b7b7561df9..2f24182ed118f7 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryTest.java @@ -13,7 +13,7 @@ import static io.opentelemetry.semconv.UserAgentAttributes.USER_AGENT_ORIGINAL; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertTarget; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static io.restassured.RestAssured.given; import static io.vertx.core.http.HttpMethod.GET; import static java.net.HttpURLConnection.HTTP_NOT_FOUND; @@ -45,10 +45,10 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.samplers.Sampler; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryXForwardedTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryXForwardedTest.java index cbcea7e09c1f70..b9db3084f10fd0 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryXForwardedTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/instrumentation/VertxOpenTelemetryXForwardedTest.java @@ -3,7 +3,7 @@ import static io.opentelemetry.api.trace.SpanKind.SERVER; import static io.opentelemetry.semconv.ClientAttributes.CLIENT_ADDRESS; import static io.quarkus.opentelemetry.deployment.common.SemconvResolver.assertSemanticAttribute; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import java.util.List; @@ -15,12 +15,12 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; import io.quarkus.opentelemetry.deployment.common.SemconvResolver; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; @@ -28,13 +28,14 @@ public class VertxOpenTelemetryXForwardedTest { @RegisterExtension static final QuarkusUnitTest unitTest = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar - .addClass(TracerRouter.class) - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class, SemconvResolver.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(TestSpanExporter.class.getPackage()) + .addClasses(TracerRouter.class, SemconvResolver.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), - "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider")) + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider") + .addAsResource(new StringAsset(InMemoryLogRecordExporterProvider.class.getCanonicalName()), + "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider")) .withConfigurationResource("application-default.properties"); @Inject diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/AddingSpanAttributesInterceptorTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/AddingSpanAttributesInterceptorTest.java index eec6fb9ebd107f..9022f3bd1f0b92 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/AddingSpanAttributesInterceptorTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/AddingSpanAttributesInterceptorTest.java @@ -24,8 +24,8 @@ import io.opentelemetry.instrumentation.annotations.SpanAttribute; import io.opentelemetry.instrumentation.annotations.WithSpan; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class AddingSpanAttributesInterceptorTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/WithSpanInterceptorTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/WithSpanInterceptorTest.java index a27ffefde3dc1e..21d52be12c8194 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/WithSpanInterceptorTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/interceptor/WithSpanInterceptorTest.java @@ -4,7 +4,7 @@ import static io.opentelemetry.api.trace.SpanKind.INTERNAL; import static io.opentelemetry.api.trace.SpanKind.SERVER; import static io.opentelemetry.api.trace.StatusCode.ERROR; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static java.net.HttpURLConnection.HTTP_OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -34,8 +34,8 @@ import io.opentelemetry.instrumentation.annotations.WithSpan; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.internal.data.ExceptionEventData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.runtime.StartupEvent; import io.quarkus.test.QuarkusUnitTest; import io.smallrye.config.SmallRyeConfig; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/LoggingFrameworkTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/LoggingFrameworkTest.java index 952d82bb35a5f1..d1a2ad2bb8cfaf 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/LoggingFrameworkTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/LoggingFrameworkTest.java @@ -17,8 +17,8 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.sdk.logs.data.LogRecordData; -import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryLogRecordExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class LoggingFrameworkTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/OtelLogsDisabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/OtelLogsDisabledTest.java index 477d6818ca4f7a..661793f1e470ea 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/OtelLogsDisabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/OtelLogsDisabledTest.java @@ -1,18 +1,18 @@ package io.quarkus.opentelemetry.deployment.logs; -import io.opentelemetry.sdk.logs.export.LogRecordExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporterProvider; -import io.quarkus.test.QuarkusUnitTest; +import static org.assertj.core.api.Assertions.assertThat; + import jakarta.enterprise.inject.Instance; import jakarta.inject.Inject; + import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.assertj.core.api.Assertions.assertThat; +import io.opentelemetry.sdk.logs.export.LogRecordExporter; +import io.quarkus.test.QuarkusUnitTest; public class OtelLogsDisabledTest { @RegisterExtension @@ -20,11 +20,10 @@ public class OtelLogsDisabledTest { .setArchiveProducer( () -> ShrinkWrap.create(JavaArchive.class) .add(new StringAsset( - "quarkus.otel.logs.enabled=false\n" + - "quarkus.otel.traces.enabled=false\n"), + "quarkus.otel.logs.enabled=false\n" + + "quarkus.otel.traces.enabled=false\n"), "application.properties")); - @Inject Instance logRecordExporter; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/GaugeCdiTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/GaugeCdiTest.java index ae133ff6a805d7..410405ed89d863 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/GaugeCdiTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/GaugeCdiTest.java @@ -14,11 +14,10 @@ import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.metrics.Meter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class GaugeCdiTest { @@ -26,10 +25,8 @@ public class GaugeCdiTest { static final QuarkusUnitTest TEST = new QuarkusUnitTest() .setArchiveProducer( () -> ShrinkWrap.create(JavaArchive.class) - .addClass(TestUtil.class) - .addClass(MeterBean.class) - .addClasses(TestSpanExporter.class, TestSpanExporterProvider.class) - .addClasses(InMemoryMetricExporter.class, InMemoryMetricExporterProvider.class) + .addPackage(InMemoryMetricExporter.class.getPackage()) + .addClasses(TestUtil.class, MeterBean.class) .addAsResource(new StringAsset(TestSpanExporterProvider.class.getCanonicalName()), "META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider") .addAsResource(new StringAsset(InMemoryMetricExporterProvider.class.getCanonicalName()), diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/MetricsTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/MetricsTest.java index 9c6ed9e2191bc0..be800fc789b236 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/MetricsTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/metrics/MetricsTest.java @@ -26,10 +26,10 @@ import io.opentelemetry.api.metrics.LongUpDownCounter; import io.opentelemetry.api.metrics.Meter; import io.opentelemetry.sdk.metrics.data.MetricData; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporter; -import io.quarkus.opentelemetry.deployment.common.InMemoryMetricExporterProvider; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class MetricsTest { @@ -44,6 +44,7 @@ public class MetricsTest { .add(new StringAsset( "quarkus.otel.metrics.enabled=true\n" + "quarkus.otel.traces.exporter=none\n" + + "quarkus.otel.logs.exporter=none\n" + "quarkus.otel.metrics.exporter=in-memory\n" + "quarkus.otel.metric.export.interval=300ms\n"), "application.properties")); diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/propagation/OpenTelemetryTextMapPropagatorCustomizerTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/propagation/OpenTelemetryTextMapPropagatorCustomizerTest.java index abb2a1c762f9d8..884e8b37ecb3de 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/propagation/OpenTelemetryTextMapPropagatorCustomizerTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/propagation/OpenTelemetryTextMapPropagatorCustomizerTest.java @@ -1,6 +1,6 @@ package io.quarkus.opentelemetry.deployment.propagation; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -26,8 +26,8 @@ import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator; import io.opentelemetry.context.propagation.TextMapPropagator; import io.opentelemetry.sdk.trace.data.SpanData; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.opentelemetry.runtime.propagation.TextMapPropagatorCustomizer; import io.quarkus.test.QuarkusUnitTest; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledTest.java index cd0a044062461c..030774ab627a15 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledTest.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledWithRootPathTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledWithRootPathTest.java index 48589c7abb23b8..3fc10021927c17 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledWithRootPathTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsDisabledWithRootPathTest.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledLegacyConfigurationTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledLegacyConfigurationTest.java index 8d8b7fef27720a..ddc869fc4552e8 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledLegacyConfigurationTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledLegacyConfigurationTest.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledTest.java index 8e36d68c90cbbd..88c0a742d0595c 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEnabledTest.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEqualRootPath.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEqualRootPath.java index 0ce7116abdbee9..2eb9744bf66c10 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEqualRootPath.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/NonAppEndpointsEqualRootPath.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryCustomSamplerBeanTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryCustomSamplerBeanTest.java index 9196e280c3dbc7..debfbfb273ead9 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryCustomSamplerBeanTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryCustomSamplerBeanTest.java @@ -23,10 +23,10 @@ import io.opentelemetry.sdk.trace.data.LinkData; import io.opentelemetry.sdk.trace.samplers.Sampler; import io.opentelemetry.sdk.trace.samplers.SamplingResult; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; import io.quarkus.opentelemetry.deployment.common.TracerRouter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryHttpCDITest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryHttpCDITest.java index f8bd9be6817e5d..fc18cf713aadd8 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryHttpCDITest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryHttpCDITest.java @@ -2,8 +2,8 @@ import static io.opentelemetry.api.trace.SpanKind.INTERNAL; import static io.opentelemetry.api.trace.SpanKind.SERVER; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; import static io.quarkus.opentelemetry.deployment.common.TestUtil.assertStringAttribute; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -25,9 +25,9 @@ import io.opentelemetry.instrumentation.annotations.WithSpan; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.SemanticAttributes; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryReactiveRoutesTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryReactiveRoutesTest.java index fd9b3088e43e7d..7c38b4be2fb612 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryReactiveRoutesTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetryReactiveRoutesTest.java @@ -1,8 +1,8 @@ package io.quarkus.opentelemetry.deployment.traces; import static io.opentelemetry.api.trace.SpanKind.SERVER; -import static io.quarkus.opentelemetry.deployment.common.TestSpanExporter.getSpanByKindAndParentId; import static io.quarkus.opentelemetry.deployment.common.TestUtil.assertStringAttribute; +import static io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter.getSpanByKindAndParentId; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -10,7 +10,6 @@ import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; -import jakarta.ws.rs.GET; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -20,9 +19,9 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.SemanticAttributes; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.vertx.web.Route; import io.restassured.RestAssured; diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerBeanTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerBeanTest.java index d155ed7d7fb21f..a06325e671e40a 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerBeanTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerBeanTest.java @@ -15,9 +15,9 @@ import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.sdk.trace.samplers.Sampler; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetrySamplerBeanTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerConfigTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerConfigTest.java index 0ff64298d64b40..86218be707ce6b 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerConfigTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySamplerConfigTest.java @@ -12,9 +12,9 @@ import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.sdk.trace.samplers.Sampler; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; import io.quarkus.opentelemetry.deployment.common.TestUtil; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.test.QuarkusUnitTest; public class OpenTelemetrySamplerConfigTest { diff --git a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySpanSecurityEventsTest.java b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySpanSecurityEventsTest.java index 41c2648e11c50b..fa5ea90a7d1f65 100644 --- a/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySpanSecurityEventsTest.java +++ b/extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/traces/OpenTelemetrySpanSecurityEventsTest.java @@ -19,8 +19,8 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.opentelemetry.api.common.AttributeKey; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporter; -import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporter; +import io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider; import io.quarkus.opentelemetry.runtime.tracing.security.SecurityEventUtil; import io.quarkus.security.spi.runtime.AbstractSecurityEvent; import io.quarkus.security.spi.runtime.AuthenticationFailureEvent; diff --git a/extensions/opentelemetry/deployment/src/test/resources/META-INF/services-config/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider b/extensions/opentelemetry/deployment/src/test/resources/META-INF/services-config/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider index 22df19ff96e608..d3b519fdda27cc 100644 --- a/extensions/opentelemetry/deployment/src/test/resources/META-INF/services-config/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider +++ b/extensions/opentelemetry/deployment/src/test/resources/META-INF/services-config/io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider @@ -1 +1 @@ -io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider \ No newline at end of file +io.quarkus.opentelemetry.deployment.common.exporter.TestSpanExporterProvider \ No newline at end of file