Skip to content

[OpenTelemetry/Tracing] Interrupted zio effects are not properly traced. #1069

@fredDJSonos

Description

@fredDJSonos

When using zio.telemetry.opentelemetry.tracing (3.1.10), interrupted zio effect are not recorded correctly.

Depending on the way we record a span, the interruption of the fiber can be totally ignored or just not ideally reported:

  • when we use spanScoped, at least an error situation is reported because the implementation is using ZIO.acquireReleaseExit that calls the releaser on interruption. But it would be even better to have a hint of what’s going with otel.status_description == "interrupted". UPDATE: there is something in otel.status_description in the case of an interruption (cause.prettyPrint). It is good enough.
  • when we use span or anything else that relies on finalizeSpanUsingEffect, nothing is reported in the span. finalizeSpanUsingEffect is using tapErrorCause, but it looks like tapErrorCause does not catch an interruption.

By the way, the same problem is presumably in v4 since .exit does not intercept an interruption either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions