Closed geota closed 4 years ago
We allow you to select a single namespace to monitor with this env var:
I'm open to PRs if you want to add logic to filter namespaces out.
Thanks, before I start on the PR -
how would you like this implemented?
Simplest implementation would be just a whitelist or blacklist:
whitelist approach:
values.watchNamespaces:
- namespace1ToInclude
- namespace2ToInclude
blacklist approach:
values.filterNamespaces:
- namespace1ToFilter
- namespace2ToFilter
I could also just provide a regex field that users can set to that would match all the namespaces they want to monitor.
values.watchNamespaces: 'somecrazy-regex-*'
I am leaning towards the whitelist approach since its very explicit and errors in newly created namespaces would NOT automatically get sent to sentry, which I think follows the principle of least astonishment.
Of course, not setting this field would default to the existing behavior.
I would merge the the ENV var defined namespace into the whitelist defined namespace.
Not sure what the expected behavior would be for if someone defines the ENV var and then provides the same namespace in the blacklist.
thoughts?
I agree whitelist would be best. I think something as simple as allowing EVENT_NAMESPACE
to be a comma separated list is fine, too.
I think this issue is OBE (overcome by events) as EVENT_NAMESPACE
allows a comma list in a string of namespaces to watch.
Is there a way to limit the forwarding of errors to particular namespace(s)?
i.e. I have a sandbox namespace that I do not care to send errors into sentry for. Can I filter this namespace out?