Skip to content

OpenTelemetry tracing does not set the span kind #2762

@ssowerby

Description

@ssowerby

When attempting to use OpenTelemetryTracingBackend in the opentelemetry-backend module with sttp 4.0.13 it seems the spans emitted do not have the span kind set to CLIENT as expected. So right now they appear as the default kind INTERNAL.

From a quick search of all the sttp code it seems both the otel4s-tracing-backend and opentelemetry-tracing-zio-backend do set the kind as expected.

It seems simply adding .setSpanKind(SpanKind.CLIENT) when using the SpanBuilder at observability/opentelemetry-backend/src/main/scala/sttp/client4/opentelemetry/OpenTelemetryTracingBackend.scala:55 would be sufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions