Quarkus OpenTelemetry generates traces/spans for accesses to management interface unexpectedly.
Issue
I am using OpenTelemetry in my Quarkus application. When management interface is enabled, Quarkus OpenTelemetry implementation unexpectedly generate traces (spans) for accesses of management URIs starting with /q
. For example, I have Java code (*1) and enabled management interface in application.properties like (*2) below,
(*1) Example Java code
@Path("/hello")
public class TracedResource {
private static final Logger LOG = Logger.getLogger(TracedResource.class);
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
LOG.info("hello");
return "hello";
}
}
(*2) Example application.properties
quarkus.management.enabled=true
quarkus.otel.traces.exporter=cdi,logging
and when I send requests including accesses to management URIs (*3-1) and (*3-2),
(*3) Example requests
$ curl http://127.0.0.1:9000/q/health/ready <---------- (*3-1) access to management URI
$ curl http://127.0.0.1:8080/hello
$ curl http://127.0.0.1:9000/q/health/ready <---------- (*3-2) access to management URI
Quarkus OpenTelemetry implementation unexpectedly generates traces (spans) for the management URIs like (*4-1) and (*4-2).
(*4) Output for the requests (*3) above
2024-02-27 14:52:19,319 INFO [io.ope.exp.log.LoggingSpanExporter] (vert.x-eventloop-thread-7) 'GET /q/health/ready' : 97f60a4ba12e317a3c78a433ea096929 1cd1169b722c4cb4 SERVER [tracer: io.quarkus.opentelemetry:] AttributesMap{data={http.client_ip=127.0.0.1, http.scheme=http, http.method=GET, http.route=/q/health/ready, http.response_content_length=45, http.target=/q/health/ready, net.host.port=9000, http.status_code=200, user_agent.original=curl/7.61.1, net.host.name=127.0.0.1}, capacity=128, totalAddedValues=10} <---------- (*4-1)
2024-02-27 14:52:19,331 INFO [org.acm.exa.TracedResource] (executor-thread-1) hello
2024-02-27 14:52:19,333 INFO [io.ope.exp.log.LoggingSpanExporter] (vert.x-eventloop-thread-2) 'GET /hello' : 61c0ceb1f4df871a7294593bc901ea61 54051b0dc23138b6 SERVER [tracer: io.quarkus.opentelemetry:] AttributesMap{data={http.client_ip=127.0.0.1, http.scheme=http, http.method=GET, http.route=/hello, http.response_content_length=5, http.target=/hello, net.host.port=8080, code.function=hello, code.namespace=org.acme.example.TracedResource, http.status_code=200, user_agent.original=curl/7.61.1, net.host.name=127.0.0.1}, capacity=128, totalAddedValues=12}
2024-02-27 14:52:19,341 INFO [io.ope.exp.log.LoggingSpanExporter] (vert.x-eventloop-thread-7) 'GET /q/health/ready' : 0482db22eb10ee4e0a37a47fe73a5937 cabacdffca9fe665 SERVER [tracer: io.quarkus.opentelemetry:] AttributesMap{data={http.client_ip=127.0.0.1, http.scheme=http, http.method=GET, http.route=/q/health/ready, http.response_content_length=45, http.target=/q/health/ready, net.host.port=9000, http.status_code=200, user_agent.original=curl/7.61.1, net.host.name=127.0.0.1}, capacity=128, totalAddedValues=10} <---------- (*4-2)
Environment
- Red Hat build of Quarkus
- 3.2.6
- 3.2.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.