Sanitize Sidekiq args?
Hi,
Is there a way to sanitize Sidekiq args ? We're already sanitizing within the before_send but I can't find how to sanitize Sidekiq context through an event
Thanks.
@ericproulx by sanitize you mean filter out or replace?
@ericproulx by sanitize you mean filter out or replace?
Replace
@ericproulx, so something like this behavior, but for sidekiq job arguments, when they're reported via Sentry?
When Raven split into new sentry gems, they've moved away from allowing you to set what fields and headers to sanitize to config.send_default_pii = false. https://docs.sentry.io/platforms/ruby/migration/#removed-processors
There's already Sentry::Sidekiq::ContextFilter that filters out sidekiq context. If you wanted to filter things out, you could patch into that.
@st0012, what's our stance on filtering out personal / sensitive information beyond the filter_default_pii info? I assume that it's up to the user now, in before_send and such?
That question is better asking @sl0thentr0py as it's probably changed since the last time I answered a similar question 😛
before_send should work for this, it should be available in event.contexts[:sidekiq] where you can do the replace/masking.