Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry: NPE in HttpInstrumenterVertxTracer.RouteGetter when request got cancelled #26764

Closed
calohmn opened this issue Jul 16, 2022 · 2 comments · Fixed by #26779
Closed

Comments

@calohmn
Copy link

calohmn commented Jul 16, 2022

Describe the bug

Relates to #26356:
Using a vert.x HTTP server along with quarkus-opentelemetry, we are seeing such exceptions in the logs:

java.lang.NullPointerException: Cannot invoke "io.vertx.core.spi.observability.HttpResponse.statusCode()" because "response" is null
	at io.quarkus.opentelemetry.runtime.tracing.vertx.HttpInstrumenterVertxTracer$RouteGetter.get(HttpInstrumenterVertxTracer.java:153)
	at io.quarkus.opentelemetry.runtime.tracing.vertx.HttpInstrumenterVertxTracer$RouteGetter.get(HttpInstrumenterVertxTracer.java:136)
	at io.opentelemetry.instrumentation.api.instrumenter.http.HttpRouteHolder.updateHttpRoute(HttpRouteHolder.java:125)
	at io.quarkus.opentelemetry.runtime.tracing.vertx.HttpInstrumenterVertxTracer.sendResponse(HttpInstrumenterVertxTracer.java:94)
	at io.quarkus.opentelemetry.runtime.tracing.vertx.HttpInstrumenterVertxTracer.sendResponse(HttpInstrumenterVertxTracer.java:41)
	at io.quarkus.opentelemetry.runtime.tracing.vertx.OpenTelemetryVertxTracer.sendResponse(OpenTelemetryVertxTracer.java:47)
	at io.quarkus.opentelemetry.runtime.tracing.vertx.OpenTelemetryVertxTracer.sendResponse(OpenTelemetryVertxTracer.java:16)
	at io.vertx.core.http.impl.Http1xServerRequest.reportRequestReset(Http1xServerRequest.java:645)
	at io.vertx.core.http.impl.Http1xServerRequest.handleException(Http1xServerRequest.java:623)
	at io.vertx.core.http.impl.Http1xServerConnection.lambda$handleClosed$6(Http1xServerConnection.java:455)
	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:71)
	at io.vertx.core.impl.DuplicatedContext.execute(DuplicatedContext.java:163)
	at io.vertx.core.impl.AbstractContext.execute(AbstractContext.java:58)
	at io.vertx.core.http.impl.Http1xServerConnection.handleClosed(Http1xServerConnection.java:454)
	at io.vertx.core.net.impl.VertxHandler.channelInactive(VertxHandler.java:143)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
[...]

They occur when a client cancels a request before the server has sent a response.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.10.2

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@calohmn calohmn added the kind/bug Something isn't working label Jul 16, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 16, 2022

/cc @Ladicek, @radcortez

@tmihalac
Copy link
Contributor

Working on this

Observability roadmap [Deprecated] automation moved this from In progress to Done Jul 25, 2022
@quarkus-bot quarkus-bot bot added this to the 2.12 - main milestone Jul 25, 2022
@gsmet gsmet modified the milestones: 2.12 - main, 2.11.1.Final Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants