Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix dangaling metrics regading status code #146

Merged
merged 5 commits into from
Jun 6, 2024
Merged

Conversation

y-eight
Copy link
Member

@y-eight y-eight commented Jun 6, 2024

Motivation

Referes to #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 (old sparrow_latency_count has been renamed to sparrow_latency_total_count)

For additional information look at the commits.

Tests done

  • Unit tests succeeded
  • 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

TODO

  • I've assigned this PR to myself
  • I've labeled this PR correctly

@lvlcn-t lvlcn-t added bug Something isn't working area/checks Issues/PRs related to Checks labels Jun 6, 2024
@y-eight y-eight requested a review from puffitos June 6, 2024 08:39
Signed-off-by: Bruno Bressi <[email protected]>
@puffitos
Copy link
Collaborator

puffitos commented Jun 6, 2024

@y-eight I've added a simple hint, which metric will replace the deprecated one.

@y-eight y-eight merged commit d55eefc into main Jun 6, 2024
13 checks passed
@y-eight y-eight deleted the feat/statuscode-fix branch June 6, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks Issues/PRs related to Checks bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants