Metrics-ingest-delay bugfix#151
Merged
SuperQ merged 3 commits intoprometheus-community:masterfrom Apr 30, 2022
Merged
Conversation
Signed-off-by: eitah <eli@spantree.net>
Signed-off-by: eitah <eli@spantree.net>
Contributor
Author
Alphabetize readme Signed-off-by: eitah <eli@spantree.net>
SuperQ
approved these changes
Apr 21, 2022
Contributor
SuperQ
left a comment
There was a problem hiding this comment.
Yup, this makes sense. Add() only returns a new value, it doesn't manipulate the state of the Time.
Contributor
|
The linter is having trouble, will figure it out. |
anas-aso
approved these changes
Apr 21, 2022
Contributor
anas-aso
left a comment
There was a problem hiding this comment.
Oups! I missed that somehow. Thanks for fixing it.
Contributor
|
I fixed the linting issue in HEAD. Going to merge this. |
Merged
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.
We noticed that with
metrics-ingest-delayflag set the exporter fails to apply the time offset as expected, despite what the debug log prints. The root cause appears to be failing to assign back the start and end times back to the original target as indicated in my PR below.I've dropped the fmt.Printf statements that allowed us to locate the bug, but feel free to revert my second commit locally to reproduce the issue. You might need to change the IF conditional from Stored bytes, a BigQuery metric, to another similar metric depending on what project you use for testing and what APIs you have available there.
I also added the feature to the README since it seems to be good to go otherwise!