forked from opsgenie/kubernetes-event-exporter
-
Notifications
You must be signed in to change notification settings - Fork 200
Add more visibility for dropped events #37
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
Merged
mustafaakin
merged 16 commits into
resmoio:master
from
Evedel:add-more-visibility-for-dropped-events
Dec 19, 2022
Merged
Add more visibility for dropped events #37
mustafaakin
merged 16 commits into
resmoio:master
from
Evedel:add-more-visibility-for-dropped-events
Dec 19, 2022
Conversation
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
4b3e10b to
b50e44a
Compare
b50e44a to
4412484
Compare
Author
|
Hello @mustafaakin, any chance you will be able to have a look? |
|
Sorry for late response. Your contribution is welcome, and thank you, we should handle it better. Can you fix the recent conflicts and send it again? |
Author
|
Not a problem @mustafaakin. Ready for review now. |
mustafaakin
approved these changes
Dec 19, 2022
marcelofernandez
added a commit
to marcelofernandez/helm-charts
that referenced
this pull request
May 25, 2023
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.
This PR is bundled with a number of changes all regarding how event age is handled. Please let me know if you want to slice them differently or what your thoughts are in general.
Dropping event handling
OnUpdate(diff link)OnUpdateis called when there was a modification to an object. Events are only spawned/populated once and not modified later. Even if they were to be modified manually, theirEventTimeandLastTimestampare going to stay the same as at an event creation (unless modified manually too, which goes against event logic), and so they are going to be discarded bykubernetes-event-exporteranywayAdding warning and prometheus metrics for when an event is discarded (diff link)
eventAge > throttlePeriod=> it is going to be silently dropped.Not only is it making debugging and choosing correct config options particularly hard (blind guessing), but also it is impossible to set promethues alarms for if a cluster has outgrown previously correct configs.
Test case:
kubernetes-event-exporterkubeQPS:100,kubeBurst:500,throttledPeriod:5,logLevel: Info)k get events -A --watch-only > only-new-events.logk scale deployment event-exporter-test --replicas 200increase( events_discarded [1m])can be used for alarmsRenaming
config.throttlePeriodtoconfig.maxEventAgeSeconds(diff link)