Alerting rules $value

Here Alerting rules | Prometheus
I Find this:

  # Alert for any instance that has a median request latency >1s.
  - alert: APIHighRequestLatency
    expr: api_http_request_latencies_second{quantile="0.5"} > 1
    for: 10m
      summary: "High request latency on {{ $labels.instance }}"
      description: "{{ $labels.instance }} has a median request latency above 1s (current value: {{ $value }}s)"

Where does it get $value from? If the expr, then that should be a boolean.

According to that same doc:

The $value variable holds the evaluated value of an alert instance.

In this case, I believe that $value is the result of the alert’s query for the given $instance. So, it’s a time-value representing the instance’s median latency. No? Am I missing your question? :+1: