Skip to content

Commit

Permalink
Replace OpenTelemetry Jaeger exporter with gRPC OTPL exporter (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik authored Sep 8, 2022
1 parent 761bb35 commit 6d267b4
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 30 deletions.
2 changes: 1 addition & 1 deletion http/graphql-telemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
<artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus.qe</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion http/vertx-web-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
<artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion monitoring/opentelemetry-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
<artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus.qe</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion monitoring/opentelemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
<artifactId>quarkus-opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus.qe</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
<quarkus.qe.framework.version>1.2.0.Beta5</quarkus.qe.framework.version>
<quarkus.qe.framework.version>1.2.0.Beta6</quarkus.qe.framework.version>
<quarkus-qpid-jms.version>0.37.0</quarkus-qpid-jms.version>
<quarkus-ide-config.version>2.6.1.Final</quarkus-ide-config.version>
<apache-httpclient-fluent.version>4.5.13</apache-httpclient-fluent.version>
Expand Down

0 comments on commit 6d267b4

Please sign in to comment.