Skip to content

bug(data): http.ping omits failed requests from latency history #3760

Description

@Tomeshwari-02

Summary

http.ping in packages/data/src/http.ts records latency history only after etch() succeeds. If a request times out, is aborted, or fails DNS/TCP, the returned HealthResult includes a latency value, but http.latency(url) never records it.

Reproduction

  1. Call �wait http.ping('http://127.0.0.1:1') or another endpoint that fails quickly.
  2. Observe that the returned result has status: 'down' and a measured latency.
  3. Call http.latency(url).

Expected behavior

Latency history should include failed checks as well, since the health result exposes a latency and dashboards/sparklines need outage timing too.

Actual behavior

Only successful fetch attempts are pushed into _latencyHistory, so down endpoints appear to have no history.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

assignedIssue claimed by a contributor.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions