Skip to content

Commit

Permalink
GraphQL: verify that span has error status when operation failed (#6011)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored May 12, 2022
1 parent d6cf074 commit aac502c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.sdk.testing.assertj.AttributeAssertion;
import io.opentelemetry.sdk.trace.data.StatusData;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
Expand Down Expand Up @@ -198,6 +199,7 @@ void parseError() {
.hasKind(SpanKind.INTERNAL)
.hasNoParent()
.hasAttributesSatisfying(Attributes::isEmpty)
.hasStatus(StatusData.error())
.hasEventsSatisfyingExactly(
event ->
event
Expand Down Expand Up @@ -243,6 +245,7 @@ void validationError() {
.hasKind(SpanKind.INTERNAL)
.hasNoParent()
.hasAttributesSatisfying(Attributes::isEmpty)
.hasStatus(StatusData.error())
.hasEventsSatisfyingExactly(
event ->
event
Expand Down

0 comments on commit aac502c

Please sign in to comment.