Skip to content

Let latency affect color (slow-but-up goes yellow) #23

Description

@bdpedigo

status_color in src/echo/views.py takes only latest_ok and window_rate, so latency never affects color. A service that has slowed from 200 ms to 25 s but still returns 2xx shows green, even though "up but slow" is a common degradation. The latency is already recorded and plotted, it just does not feed the color.

Approach

  • Add an optional per-probe latency budget that turns a probe yellow when exceeded. Red stays for hard failures.
  • Alternative that needs no tuning: turn yellow when the latest latency is some multiple of the probe's recent median. The history is already available.
  • Keep the color logic in echo.views.
  • Might want to document this as a different color to make the difference in meaning distinct.

Acceptance criteria

  • A slow but successful probe can render yellow via a budget or a relative rule.
  • Color logic stays in echo.views.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions