Skip to content

Commit c22e3fa

Browse files
committed
fix
1 parent 2ddd571 commit c22e3fa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpServerTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,9 @@ protected void assertTheTraces(
10271027

10281028
testing.waitAndAssertTraces(assertions);
10291029

1030-
if (endpoint == EXCEPTION && emitExceptionAsLogs()) {
1030+
if (endpoint == EXCEPTION
1031+
&& emitExceptionAsLogs()
1032+
&& options.hasExceptionOnServerSpan.test(endpoint)) {
10311033
assertExceptionLogs(options.expectedException, "http.server.request.exception");
10321034
}
10331035
}

0 commit comments

Comments
 (0)