Skip to content

How to scrub/sanitise transactions #1226

Closed
@i-am-david-fernandez

Description

@i-am-david-fernandez

I have only just begun evaluating Sentry (in a python/django backend context, to be expanded to cover a javascript/angular frontend/client), and so far I am very impressed. One thing stopping me from using it fully, however, and as CISO recommending its use in our products, is the seeming inability to scrub/sanitise performance data (transactions, I believe). The before_send and before_breadcrumb callbacks appear to be more than flexible enough to scrub events and breadcrumbs before they leave the application, but there appears to be no equivalent for scrubbing performance data. As a result, the data available via sentry.io contains things I do not wish it to (e.g., sensitive data within request bodies). The result is that I simply cannot use performance monitoring outside, perhaps, development environments with toy/non-sensitive data.

The documentation (https://develop.sentry.dev/sdk/performance/#interaction-with-beforesend-and-event-processors) states this:

Transactions should not go through beforeSend.

which makes me confident I haven't simply missed something (though I'd be more than happy to be corrected here).

My request, then, is for the SDK to provide an equivalent to before_send that allows complete control over what data gets sent via performance monitoring. More broadly, it should be possible to scrub any and all data that is being sent (which at this stage appears to be only events, breadcrumbs and transactions, but perhaps the list is longer). I can't consider Sentry to be a security-compliant tool without such facilities, and quite frankly, given the obvious awareness of the importance of managing PII, I'm surprised that this problem exists.

I'd love to make full use of Sentry, as I think it's both a brilliant idea and, above issue not-withstanding, well executed, so I hope this request is thoughtfully considered.

Thank-you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions