CSP reporting with session replay #9280
-
Hello! I have set up security policy reporting according to the documentation: https://docs.sentry.io/product/security-policy-reporting/ However, there seems to be no way of getting session replays along with the alert. We're having some CSP violation alerts that are difficult to debug and understand, and it would be very helpful to see what the user was doing that led to the vialotion. Is there possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @filiptammergard - unfortunately this is non-trivial because CSP doesn't actually led to an error being created by the SDK itself. Instead via headers you define the browser sends the CSP error directly to Sentry (no SDK involved there). This means there is no way for the Replay SDK to understand that a CSP error has been created (to adjust replay sampling accordingly). cc @bruno-garcia @jas-kas something we might want to think about. |
Beta Was this translation helpful? Give feedback.
Hey @filiptammergard - unfortunately this is non-trivial because CSP doesn't actually led to an error being created by the SDK itself. Instead via headers you define the browser sends the CSP error directly to Sentry (no SDK involved there). This means there is no way for the Replay SDK to understand that a CSP error has been created (to adjust replay sampling accordingly).
cc @bruno-garcia @jas-kas something we might want to think about.