Skip to content

Expose request latency automatically #120

Closed
Closed

Description

@aram356

Description

Capture request duration and expose it through logs or headers without requiring application-written timing code.

The built-in RequestLogger records elapsed_ms on successful and failed request handling and emits tracing log events. Generated application manifests install this middleware, so callers can use the existing logging integration without writing timestamp calculations. The duration is the middleware/handler interval; this issue did not require full streamed-response completion timing.

Steps to reproduce

  1. Inspect RequestLogger success/error branches and their elapsed_ms events.
  2. Inspect the generated application manifest's built-in middleware registration.
  3. Use the application's configured tracing output to consume these existing events; this audit did not execute a runtime probe.

Expected behavior

Built-in request middleware captures duration and emits a log signal without custom timing calculations.

Impact

The original automatic request-latency capability is available. Consistent adapter logging sinks and richer phase/lifecycle timing remain separate work.

Proposed fix

Close as completed using RequestLogger. Keep cross-adapter logging integration in #119 and generic timing-collector work in #446 / #389.

Done when

  • Built-in middleware captures request duration.
  • Success and error events include elapsed_ms through the existing tracing facade.
  • Generated application configuration registers the built-in middleware without application-written timing code.

Related

The requested implementation is present on the audited main revision. This audit inspected source and existing coverage; it did not rerun the tests.

Activity

  1. changed the title [-]As a developer I want to measure request latency automatically[/-] [+]Expose request latency automatically[/+] on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions