From 6d267b442ba2da25e5bd0a81d328814fbad8a8f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?=
<43821672+michalvavrik@users.noreply.github.com>
Date: Thu, 8 Sep 2022 15:17:48 +0200
Subject: [PATCH] Replace OpenTelemetry Jaeger exporter with gRPC OTPL exporter
(#821)
---
http/graphql-telemetry/pom.xml | 2 +-
.../ts/http/graphql/telemetry/GraphQLTelemetryIT.java | 5 ++---
.../io/quarkus/ts/http/graphql/GraphQLTracingIT.java | 2 +-
http/vertx-web-client/pom.xml | 2 +-
.../src/main/resources/application.properties | 3 ---
.../ts/http/vertx/webclient/VertxWebClientIT.java | 9 +++------
.../src/test/resources/application.properties | 3 ---
.../ts/microprofile/opentracing/MicroProfileIT.java | 2 +-
monitoring/opentelemetry-reactive/pom.xml | 2 +-
.../opentelemetry/reactive/OpentelemetryReactiveIT.java | 7 +++----
monitoring/opentelemetry/pom.xml | 2 +-
.../io/quarkus/ts/opentelemetry/OpentelemetryIT.java | 6 +++---
.../opentracing/reactive/grpc/AbstractTraceIT.java | 2 +-
pom.xml | 2 +-
14 files changed, 19 insertions(+), 30 deletions(-)
diff --git a/http/graphql-telemetry/pom.xml b/http/graphql-telemetry/pom.xml
index a1fdf7107..656b8abf3 100644
--- a/http/graphql-telemetry/pom.xml
+++ b/http/graphql-telemetry/pom.xml
@@ -17,7 +17,7 @@
io.quarkus
- quarkus-opentelemetry-exporter-jaeger
+ quarkus-opentelemetry-exporter-otlp
io.quarkus.qe
diff --git a/http/graphql-telemetry/src/test/java/io/quarkus/ts/http/graphql/telemetry/GraphQLTelemetryIT.java b/http/graphql-telemetry/src/test/java/io/quarkus/ts/http/graphql/telemetry/GraphQLTelemetryIT.java
index 61efce3e9..92fb0d068 100644
--- a/http/graphql-telemetry/src/test/java/io/quarkus/ts/http/graphql/telemetry/GraphQLTelemetryIT.java
+++ b/http/graphql-telemetry/src/test/java/io/quarkus/ts/http/graphql/telemetry/GraphQLTelemetryIT.java
@@ -21,14 +21,13 @@
@QuarkusScenario
public class GraphQLTelemetryIT {
- private static final int GRPC_COLLECTOR_PORT = 14250;
- @JaegerContainer(restPort = GRPC_COLLECTOR_PORT)
+ @JaegerContainer(useOtlpCollector = true)
static JaegerService jaeger = new JaegerService();
@QuarkusApplication
static RestService app = new RestService()
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@Test
void verifyTelemetry() {
diff --git a/http/graphql/src/test/java/io/quarkus/ts/http/graphql/GraphQLTracingIT.java b/http/graphql/src/test/java/io/quarkus/ts/http/graphql/GraphQLTracingIT.java
index 7e3e20907..802c61b9c 100644
--- a/http/graphql/src/test/java/io/quarkus/ts/http/graphql/GraphQLTracingIT.java
+++ b/http/graphql/src/test/java/io/quarkus/ts/http/graphql/GraphQLTracingIT.java
@@ -29,7 +29,7 @@ public class GraphQLTracingIT {
@QuarkusApplication
static RestService app = new RestService()
.withProperty("quarkus.jaeger.service-name", SERVICE_NAME)
- .withProperty("quarkus.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.jaeger.endpoint", jaeger::getCollectorUrl);
@Test
void verifyTracesInJaegerTest() {
diff --git a/http/vertx-web-client/pom.xml b/http/vertx-web-client/pom.xml
index e112e829e..59347ff99 100644
--- a/http/vertx-web-client/pom.xml
+++ b/http/vertx-web-client/pom.xml
@@ -17,7 +17,7 @@
io.quarkus
- quarkus-opentelemetry-exporter-jaeger
+ quarkus-opentelemetry-exporter-otlp
io.quarkus
diff --git a/http/vertx-web-client/src/main/resources/application.properties b/http/vertx-web-client/src/main/resources/application.properties
index 2bc06b646..e46f2a20e 100644
--- a/http/vertx-web-client/src/main/resources/application.properties
+++ b/http/vertx-web-client/src/main/resources/application.properties
@@ -3,8 +3,5 @@ chucknorris.api.domain=https://api.chucknorris.io
vertx.webclient.timeout-sec=2
vertx.webclient.retries=3
-# Jaeger
-quarkus.opentelemetry.tracer.exporter.jaeger.endpoint=http://localhost:14250/api/traces
-
# debug symbols enabled
quarkus.native.debug.enabled=true
diff --git a/http/vertx-web-client/src/test/java/io/quarkus/ts/http/vertx/webclient/VertxWebClientIT.java b/http/vertx-web-client/src/test/java/io/quarkus/ts/http/vertx/webclient/VertxWebClientIT.java
index 13c1765b5..a49f9bdab 100644
--- a/http/vertx-web-client/src/test/java/io/quarkus/ts/http/vertx/webclient/VertxWebClientIT.java
+++ b/http/vertx-web-client/src/test/java/io/quarkus/ts/http/vertx/webclient/VertxWebClientIT.java
@@ -48,14 +48,11 @@ public class VertxWebClientIT {
static final String EXPECTED_ID = "aBanNLDwR-SAz7iMHuCiyw";
static final String EXPECTED_VALUE = "Chuck Norris has already been to mars; that why there's no signs of life";
static final int DELAY = 3500; // must be greater than vertx.webclient.timeout-sec
-
- private static final int REST_PORT = 16686;
- private static final int TRACE_PORT = 14250;
private static final String TRACE_PING_PATH = "/trace/ping";
private Response resp;
- @JaegerContainer(tracePort = TRACE_PORT, restPort = REST_PORT, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
+ @JaegerContainer(useOtlpCollector = true, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
static final JaegerService jaeger = new JaegerService();
@Container(image = "${wiremock.image}", port = 8080, expectedLog = "verbose")
@@ -64,7 +61,7 @@ public class VertxWebClientIT {
@QuarkusApplication
static RestService vertx = new RestService()
.withProperty("chucknorris.api.domain", () -> wiremock.getHost() + ":" + wiremock.getPort())
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getTraceUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@Test
@DisplayName("Vert.x WebClient [flavor: mutiny] -> Map json response body to POJO")
@@ -147,7 +144,7 @@ private void thenRetrieveTraces(int pageLimit, String lookBack, String serviceNa
.queryParam("lookback", lookBack)
.queryParam("service", serviceName)
.queryParam("operation", operationName)
- .get(jaeger.getRestUrl());
+ .get(jaeger.getTraceUrl());
}
private void thenStatusCodeMustBe(int expectedStatusCode) {
diff --git a/http/vertx-web-client/src/test/resources/application.properties b/http/vertx-web-client/src/test/resources/application.properties
index b517f0687..eca6791d5 100644
--- a/http/vertx-web-client/src/test/resources/application.properties
+++ b/http/vertx-web-client/src/test/resources/application.properties
@@ -4,6 +4,3 @@ quarkus.test.native-image-profile=test
chucknorris.api.domain=https://api.chucknorris.io/
vertx.webclient.timeout-sec=1
vertx.webclient.retries=1
-
-# Jaeger
-quarkus.opentelemetry.tracer.exporter.jaeger.endpoint=http://localhost:14250/api/traces
diff --git a/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/MicroProfileIT.java b/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/MicroProfileIT.java
index c2246ddfe..ead1f284a 100644
--- a/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/MicroProfileIT.java
+++ b/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/MicroProfileIT.java
@@ -43,7 +43,7 @@ public class MicroProfileIT {
@QuarkusApplication
static RestService app = new RestService()
.withProperty("quarkus.jaeger.service-name", SERVICE_NAME)
- .withProperty("quarkus.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.jaeger.endpoint", jaeger::getCollectorUrl);
@Order(1)
@Test
diff --git a/monitoring/opentelemetry-reactive/pom.xml b/monitoring/opentelemetry-reactive/pom.xml
index 0c956d58e..9b9ead084 100644
--- a/monitoring/opentelemetry-reactive/pom.xml
+++ b/monitoring/opentelemetry-reactive/pom.xml
@@ -25,7 +25,7 @@
io.quarkus
- quarkus-opentelemetry-exporter-jaeger
+ quarkus-opentelemetry-exporter-otlp
io.quarkus.qe
diff --git a/monitoring/opentelemetry-reactive/src/test/java/io/quarkus/ts/opentelemetry/reactive/OpentelemetryReactiveIT.java b/monitoring/opentelemetry-reactive/src/test/java/io/quarkus/ts/opentelemetry/reactive/OpentelemetryReactiveIT.java
index 12211eea9..f0bedc15a 100644
--- a/monitoring/opentelemetry-reactive/src/test/java/io/quarkus/ts/opentelemetry/reactive/OpentelemetryReactiveIT.java
+++ b/monitoring/opentelemetry-reactive/src/test/java/io/quarkus/ts/opentelemetry/reactive/OpentelemetryReactiveIT.java
@@ -25,24 +25,23 @@
@QuarkusScenario
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Windows does not support Linux Containers / Testcontainers")
public class OpentelemetryReactiveIT {
- private static final int GRPC_COLLECTOR_PORT = 14250;
private Response resp;
- @JaegerContainer(restPort = GRPC_COLLECTOR_PORT, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
+ @JaegerContainer(useOtlpCollector = true, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
static final JaegerService jaeger = new JaegerService();
@QuarkusApplication(classes = PongResource.class, properties = "pong.properties")
static final RestService pongservice = new RestService()
.withProperty("quarkus.application.name", "pongservice")
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@QuarkusApplication(classes = { PingResource.class, PingPongService.class })
static final RestService pingservice = new RestService()
.withProperty("quarkus.application.name", "pingservice")
.withProperty("pongservice_url", pongservice::getHost)
.withProperty("pongservice_port", () -> String.valueOf(pongservice.getPort()))
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@Test
public void testContextPropagation() {
diff --git a/monitoring/opentelemetry/pom.xml b/monitoring/opentelemetry/pom.xml
index e0c96c902..837a82d63 100644
--- a/monitoring/opentelemetry/pom.xml
+++ b/monitoring/opentelemetry/pom.xml
@@ -25,7 +25,7 @@
io.quarkus
- quarkus-opentelemetry-exporter-jaeger
+ quarkus-opentelemetry-exporter-otlp
io.quarkus.qe
diff --git a/monitoring/opentelemetry/src/test/java/io/quarkus/ts/opentelemetry/OpentelemetryIT.java b/monitoring/opentelemetry/src/test/java/io/quarkus/ts/opentelemetry/OpentelemetryIT.java
index bbb628b65..91212a269 100644
--- a/monitoring/opentelemetry/src/test/java/io/quarkus/ts/opentelemetry/OpentelemetryIT.java
+++ b/monitoring/opentelemetry/src/test/java/io/quarkus/ts/opentelemetry/OpentelemetryIT.java
@@ -29,20 +29,20 @@ public class OpentelemetryIT {
private Response resp;
- @JaegerContainer(restPort = GRPC_COLLECTOR_PORT, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
+ @JaegerContainer(useOtlpCollector = true, expectedLog = "\"Health Check state change\",\"status\":\"ready\"")
static final JaegerService jaeger = new JaegerService();
@QuarkusApplication(classes = PongResource.class, properties = "pong.properties")
static final RestService pongservice = new RestService()
.withProperty("quarkus.application.name", "pongservice")
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@QuarkusApplication(classes = { PingResource.class, PingPongService.class })
static final RestService pingservice = new RestService()
.withProperty("quarkus.application.name", "pingservice")
.withProperty("pongservice_url", pongservice::getHost)
.withProperty("pongservice_port", () -> String.valueOf(pongservice.getPort()))
- .withProperty("quarkus.opentelemetry.tracer.exporter.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.opentelemetry.tracer.exporter.otlp.endpoint", jaeger::getCollectorUrl);
@Test
public void testContextPropagation() {
diff --git a/monitoring/opentracing-reactive-grpc/src/test/java/io/quarkus/ts/monitoring/opentracing/reactive/grpc/AbstractTraceIT.java b/monitoring/opentracing-reactive-grpc/src/test/java/io/quarkus/ts/monitoring/opentracing/reactive/grpc/AbstractTraceIT.java
index 312d1896c..b59ceafa8 100644
--- a/monitoring/opentracing-reactive-grpc/src/test/java/io/quarkus/ts/monitoring/opentracing/reactive/grpc/AbstractTraceIT.java
+++ b/monitoring/opentracing-reactive-grpc/src/test/java/io/quarkus/ts/monitoring/opentracing/reactive/grpc/AbstractTraceIT.java
@@ -29,7 +29,7 @@ public abstract class AbstractTraceIT {
@QuarkusApplication
static RestService app = new RestService()
- .withProperty("quarkus.jaeger.endpoint", jaeger::getRestUrl);
+ .withProperty("quarkus.jaeger.endpoint", jaeger::getCollectorUrl);
@Test
public void testServerClientTrace() {
diff --git a/pom.xml b/pom.xml
index 359381c58..cae4d2f96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
quarkus-bom
io.quarkus
999-SNAPSHOT
- 1.2.0.Beta5
+ 1.2.0.Beta6
0.37.0
2.6.1.Final
4.5.13