-
Notifications
You must be signed in to change notification settings - Fork 211
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
fix: prevent potential misconfiguration of metricsInterval (#284) #638
Merged
ritwikranjan
merged 1 commit into
microsoft:main
from
ritwikranjan:284-prevent-the-potential-for-misconfiguration-of-metricsinterval
Aug 29, 2024
Merged
fix: prevent potential misconfiguration of metricsInterval (#284) #638
ritwikranjan
merged 1 commit into
microsoft:main
from
ritwikranjan:284-prevent-the-potential-for-misconfiguration-of-metricsinterval
Aug 29, 2024
Conversation
This file contains 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
ritwikranjan
force-pushed
the
284-prevent-the-potential-for-misconfiguration-of-metricsinterval
branch
from
August 23, 2024 13:33
19d5248
to
9f74609
Compare
timraymond
reviewed
Aug 23, 2024
rbtr
reviewed
Aug 23, 2024
rbtr
reviewed
Aug 23, 2024
rbtr
reviewed
Aug 23, 2024
ritwikranjan
requested review from
a team
and removed request for
xiaozhiche320 and
karina-ranadive
August 26, 2024 23:17
timraymond
previously approved these changes
Aug 27, 2024
ritwikranjan
force-pushed
the
284-prevent-the-potential-for-misconfiguration-of-metricsinterval
branch
from
August 28, 2024 10:50
58ce584
to
57fb848
Compare
…#284) Signed-off-by: Ritwik Ranjan <[email protected]>
ritwikranjan
force-pushed
the
284-prevent-the-potential-for-misconfiguration-of-metricsinterval
branch
from
August 28, 2024 11:00
57fb848
to
62ec411
Compare
ibezrukavyi
approved these changes
Aug 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approve merge from the main branch
rbtr
approved these changes
Aug 29, 2024
ritwikranjan
deleted the
284-prevent-the-potential-for-misconfiguration-of-metricsinterval
branch
August 29, 2024 16:30
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.
Description
I have added a new field
metricsIntervalDuration
of typetime.Duration
. It will super cede themetricsInterval
configuration of the same type. The older key is not removed to keep backward compatibility. The change is done to prevent potential misconfiguration that can happen by assigning a duration tometricsInterval
when it is converted to seconds.Related Issue
Issue #284
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
The logs showing that retina agent runs successffully after making the changes.
This shows the log line that
metricsInterval
should not be used.Additional Notes
I was not able to us the
zap
logger as it is probably not initialized when theGetConfig
is called or I might be missing how to use it so i used the golog
library. Do let me know if we need to change that.Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.