Skip to content

otel spans not flushed in _after? #682

@vin

Description

@vin

Expected Behavior

Spans from uncaught exceptions should still reliably reach datadog.

Actual Behavior

Many spans from uncaught errors are lost before they can be sent.

This needs further investigation, but I suspect it's because datadog_wrapper's _after method specifically flushes ddtrace-generated spans but not opentelemetry-api ones? Maybe it needs to also call TracerProvider.force_flush if applicable?

Specifications

  • Datadog Lambda Layer version: 86
  • Python version: 3.11.14

Stacktrace

Paste here

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