enhancement: stale marker when series expire#7056
Draft
LucasMRC wants to merge 7 commits intografana:mainfrom
Draft
enhancement: stale marker when series expire#7056LucasMRC wants to merge 7 commits intografana:mainfrom
LucasMRC wants to merge 7 commits intografana:mainfrom
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
d64b106 to
4636e05
Compare
d89612a to
a3e8ddb
Compare
LucasMRC
commented
Apr 25, 2026
Comment on lines
+476
to
+481
| if math.IsNaN(expected.v) { | ||
| // Check for stale marker | ||
| assert.True(t, math.IsNaN(actual.v)) | ||
| } else { | ||
| assert.Equal(t, expected.v, actual.v) | ||
| } |
Author
There was a problem hiding this comment.
Now that the stale marker is being sent, the metric is not removed from the samples. I updated this so that I can test for the stale marker, but there's also the option to filter out stale markers in the capturingAppender.Append so that the sample would be removed as in the current test.
LucasMRC
commented
Apr 25, 2026
Comment on lines
+185
to
+189
| if appender != nil { | ||
| _, err := appender.Append(0, s.labels, timeMs, math.Float64frombits(value.StaleNaN)) | ||
| if err != nil { | ||
| errs = append(errs, err) | ||
| } |
Author
There was a problem hiding this comment.
I wasn't sure on how to handle errors in the updated removeStaleSeries functions, I copied the pattern that I saw in modules/generator/config.go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
sends a stale marker to remote write when a series is removed as stale
Which issue(s) this PR fixes:
closes #6494
Checklist
Documentation addedCHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]