Skip to content

[probes.http] Support full HTTP response latency measurements #1568

Open

Description

@suikammd

Use case

I'm evaluating Cloudprober for monitoring the availability and latency of multiple third-party APIs. These are non-streaming HTTP requests that can take up to a minute to complete.

We would like to monitor both the network latency breakdown (DNS, TCP, TLS, etc.) and the end-to-end latency as experienced by the client, including the time required to receive the complete response body.

Current limitation

Currently, the HTTP probe measures latency immediately after client.Do(req) returns, before reading the response body.

As a result, although Cloudprober reads the entire response body, the reported latency does not include the body transfer time. This can underestimate the actual latency experienced by the client, particularly when the server sends response headers early.

Proposed solution

Add two optional measurements to the existing latency_breakdown configuration:

  • RESPONSE_READ_LATENCY: Time spent reading the response body after receiving the response headers.
  • TOTAL_LATENCY: Time from initiating the HTTP request to completing the response body read.

The existing latency metric should retain its current semantics for backward compatibility. Both new metrics should support the existing histogram aggregation and latency configuration.

I've opened #1567 with a proposed implementation. Happy to adjust the approach based on maintainer feedback.

Activity

  1. added
    enhancement
    on Nov 17, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions