Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Pod Term Detection and Make SkipLevels Configurable #1

Merged
merged 2 commits into from
Apr 23, 2021

Conversation

paxbit
Copy link

@paxbit paxbit commented Apr 23, 2021

Hi @janLo,

regarding your question about the code path being taken I think the implementation was indeed not quite correct. LastTerminationState is the previous state, not the current one. It is set only in cases of restarting containers.

The doc is not very good on that though:
https://v1-17.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#containerstatus-v1-core
See state vs lastState

I also added the feature to configure the skipped event levels.

The change does work properly against my local Sentry 9.1.2 desktop setup.

paxbit added 2 commits April 23, 2021 17:19
…VENT_LEVELS...

- Leaving SKIP_EVENT_LEVELS unset
  Defaults to old behavior, "normal" type events will be skipped

- Setting SKIP_EVENT_LEVELS to empty
  No event type will be skipped

- Setting SKIP_EVENT_LEVELS to a comma separated event type list like "SKIP_EVENT_LEVELS=normal,warning"
  All events of those types will be skipped. The filtering mechanism is case-insensitive, so "normal,warning" is the same as "nOrMal,WARning".
@janLo janLo merged commit 75683bc into janLo:refactor-pod-observation Apr 23, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants