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

Ignore metrics read over prometheus with NaN value #1231

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

cmetz100
Copy link
Contributor

@cmetz100 cmetz100 commented Feb 4, 2025

What does this PR do?

Ignores counters and guages scraped over prometheus that have a NaN value.

Motivation

Turns out NaN is a valid constant of f64 so when we scrape prometheus endpoint and read a NaN value we try to set it as a gauge or counter. This is then translated to null in the capture file. null in the capture file causes rouster-series-sender to fail when submitting metrics

Related issues

I am not 100% confident that this is all we need to handle all edges regarding NaN

@cmetz100 cmetz100 marked this pull request as ready for review February 4, 2025 18:48
@cmetz100 cmetz100 requested a review from a team as a code owner February 4, 2025 18:48
@cmetz100 cmetz100 force-pushed the cmetz/ignore_null_in_prometheous_scraping branch from e33d9c4 to 4dff200 Compare February 4, 2025 20:15
@scottopell scottopell enabled auto-merge (squash) February 6, 2025 17:19
@scottopell scottopell merged commit b7b446f into main Feb 6, 2025
17 checks passed
@scottopell scottopell deleted the cmetz/ignore_null_in_prometheous_scraping branch February 6, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants