Skip to content

Request-scoped log context #439

Description

@ypldan

QuickApps version

latest

What is the problem this feature will solve?

Log records carry no request identity unless OTEL log correlation is enabled (off by default) — concurrent requests interleave without a way to tell them apart, and the lifecycle events from #435 can't be stitched into one request's story. The existing error_reference appears only in the final exception handler, not on the records leading up to it.

What is the feature you are proposing to solve the problem?

Ambient request-scoped context (request id, app/deployment id) stamped on every record emitted during a request, independent of OTEL, rendered in both text and JSON output; extend the error_reference idea so one reference finds all of a request's records.

What alternatives have you considered?

Relying on OTEL trace correlation alone — investigation should work from plain logs without a tracing backend. Passing ids into individual log calls — unenforceable across ~90 logging modules; enrichment must be ambient.

Additional information

After #438 (field-naming contract) and #435 (the events these fields decorate). The existing OtelAwareFormatter shows the pattern for conditionally rendered context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions