Skip to content

New package: unhandled Exceptions logging instrumentation #4209

@iblancasa

Description

@iblancasa

This ticket is to add a new contrib instrumentation package that captures uncaught exceptions and unhandled asyncio task exceptions and emits them as OpenTelemetry logs. This provides a consistent, out‑of‑the‑box error tracking signal across services without custom handlers, and ensures "last error" telemetry reaches the standard logs pipeline.

Backend services frequently fail without producing telemetry:

  • Uncaught exceptions terminate processes without a log record.
  • Unhandled asyncio task exceptions are only printed to stderr.

Teams lose stack traces, severity, and a consistent error tracking experience.

Once one of those events happens, the new instrumentation can capture the Exception and create a log message following the OpenTelemetry semantic conventions for exception: https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-logs/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions