The metric sparrow_latency_duration_seconds will now be clear before the new duration with label status is exposed.
Dangling metrics that do not show the current status are cleared up.
Additionally, I have introduced two new metrics like @puffitos suggested.
sparrow_latency_seconds
sparrow_latency_count (old sparrow_latency_count has been renamed to sparrow_latency_total_count)
For additional information look at the commits.
Tests done
[x] Unit tests succeeded
[x] E2E tests succeeded
First run:
# TYPE sparrow_latency_duration_seconds gauge
sparrow_latency_duration_seconds{status="200",target="https://gitlab.devops.telekom.de"} 0.222653973
sparrow_latency_duration_seconds{status="200",target="https://httpstat.us/random/200,500-504"} 0.711660485
sparrow_latency_duration_seconds{status="418",target="https://yam.telekom.de"} 0.214198665
Second run:
# TYPE sparrow_latency_duration_seconds gauge
sparrow_latency_duration_seconds{status="200",target="https://gitlab.devops.telekom.de"} 0.24624422
sparrow_latency_duration_seconds{status="418",target="https://yam.telekom.de"} 0.212984192
sparrow_latency_duration_seconds{status="502",target="https://httpstat.us/random/200,500-504"} 0.69023805
Motivation
Referes to https://github.com/caas-team/sparrow/issues/133
Changes
The metric
sparrow_latency_duration_seconds
will now be clear before the new duration with label status is exposed. Dangling metrics that do not show the current status are cleared up.Additionally, I have introduced two new metrics like @puffitos suggested.
sparrow_latency_seconds
sparrow_latency_count
(oldsparrow_latency_count
has been renamed tosparrow_latency_total_count
)For additional information look at the commits.
Tests done
First run:
Second run:
TODO