google / google/slo-generator

Check `float` type hints in Prometheus backend

Open
#269 0 comments 0 reactions 1 assignee Claimed by @lvaylet View on GitHub
bug p/prometheus
Dominant language
Python
Stars
564
Forks
88
PR merge metrics
No merged PRs in 30d

Description

`count()` and `distribution_cut()` in `slo_generator/backends/prometheus.py` return `float` and `Tuple[float, float]`, respectively, while counts are expected to be `int`.

Check exactly what is returned by the Prometheus API, for example by setting breakpoints and inspecting values when querying a local containerized Prometheus, and confirm whether (and why) we need to convert the response to `float`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.