quarkusio/quarkus · info · NoStackTraceException

dummy

Error message

dummy

What it means

A NoStackTraceException with the message 'dummy' is thrown by the blockingException endpoint of the ReactiveResource OpenTelemetry test. Its purpose is to generate a deliberate server-side exception so the test can assert that the exception is recorded on the current OTel span (span status/events) without polluting output with stack traces. It is not an actual failure of application logic.

Source

Thrown at integration-tests/opentelemetry-reactive/src/main/java/io/quarkus/it/opentelemetry/reactive/ReactiveResource.java:97

        return Uni.combine().all().unis(
                client.helloGetUniDelay(),
                client.helloGet("Naruto"),
                client.helloGet("Goku"),
                client.helloGetUniExecutor())
                .with((s, s2, s3, s4) -> s + " and " + s2 + " and " + s3 + " and " + s4);
    }

    @POST
    public Uni<String> helloPost(String body) {
        Span span = tracer.spanBuilder("helloPost").startSpan();
        return Uni.createFrom().item("Hello " + body).onItem().delayIt().by(Duration.ofMillis(MILLISECONDS_DELAY))
                .eventually((Runnable) span::end);
    }

    @Path("blockingException")
    @GET
    public String blockingException() {
        throw new NoStackTraceException("dummy");
    }

    @Path("reactiveException")
    @GET
    public Uni<String> reactiveException() {
        return Uni.createFrom().item(() -> {
            throw new NoStackTraceException("dummy2");
        });
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. If seen in tests, this is expected — verify the test asserts the span records the exception rather than failing on the 500 response.
  2. If hit accidentally via HTTP, simply call a non-exception endpoint; this route always throws by design.
  3. Ensure error-page/exception-mapper configuration doesn't suppress the expected OTel span error attributes.
  4. When asserting, use the OTel testing collector to look for the span with an exception event carrying 'dummy'.

Example fix

// before (endpoint intentionally throws)
@Path("blockingException")
@GET
public String blockingException() {
    throw new NoStackTraceException("dummy");
}
// after (if you need a non-throwing variant for manual testing)
@Path("blockingException")
@GET
public String blockingException() {
    return "ok";
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (path.endsWith("blockingException")) {
    // endpoint always throws by design; expect 500 and assert span exception
}

Try / catch

try {
    response = given().get("/blockingException");
} catch (Exception e) {
    // expected: endpoint always throws NoStackTraceException("dummy")
}
// then assert the OTel span has an exception event with message 'dummy'

Prevention

When it happens

Trigger: GET .../blockingException is called by the test to produce a synchronous (blocking) exception that should be captured by the OpenTelemetry instrumentation.

Common situations: Appears when running the opentelemetry-reactive integration tests; also seen by anyone exercising the endpoint manually via curl/browser while tracing is active.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/f5e66795dbf2ad7d. Report an issue: GitHub.