Skip to content

Commit c37fa9c

Browse files
Add span kind assertions to OpenTelemetryTracingBackend tests
Co-authored-by: Adam Warski <adamw@users.noreply.github.com>
1 parent 3d3ac72 commit c37fa9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

observability/opentelemetry-backend/src/test/scala/sttp/client4/opentelemetry/OpenTelemetryTracingBackendTest.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class OpenTelemetryTracingBackendTest extends AnyFlatSpec with Matchers {
3333
val span = spanItems.head
3434

3535
span.getName() shouldBe "GET"
36+
span.getKind() shouldBe io.opentelemetry.api.trace.SpanKind.CLIENT
3637

3738
val attributes = span.getAttributes().asMap().asScala
3839
attributes(UrlAttributes.URL_FULL) shouldBe "http://test.com/foo"
@@ -58,6 +59,7 @@ class OpenTelemetryTracingBackendTest extends AnyFlatSpec with Matchers {
5859
spanItems should have size 1
5960

6061
val span = spanItems.head
62+
span.getKind() shouldBe io.opentelemetry.api.trace.SpanKind.CLIENT
6163
val attributes = span.getAttributes().asMap().asScala
6264
attributes(UrlAttributes.URL_FULL) shouldBe "http://test.com/foo"
6365
attributes(ErrorAttributes.ERROR_TYPE) shouldBe "RuntimeException"

0 commit comments

Comments
 (0)