Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow postponing event captures until User Consent is collected #6758

Open
bruno-garcia opened this issue Jan 12, 2023 · 5 comments
Open

Allow postponing event captures until User Consent is collected #6758

bruno-garcia opened this issue Jan 12, 2023 · 5 comments
Labels
Package: core Issues related to the Sentry Core SDK Type: Improvement

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Jan 12, 2023

Have the SDK operate ‘properly’, with it's configured features such as Replay. But ‘hold off’ on sending events until consent is given. If revoked stop events from being sent again.

Sentry Native already supports user consent (not for all backends though), we can borrow the idea and do something similar getsentry/sentry-native@a51ccbb/src/sentry_options.c#L276-L286

Relates to:

Specifically:

There's an internal doc that should be moved to GitHub.

@bruno-garcia bruno-garcia changed the title Allow postponing event captures until _User Consent_ is collected Allow postponing event captures until User Consent is collected Jan 12, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
@bruno-garcia
Copy link
Member Author

@AbhiPrasad any notes on why we decided not to go ahead with this?

@AbhiPrasad
Copy link
Member

Nope, I think it just fell through the cracks. I moved it to Archived since it was a stale-bot closed issue. We can re-open and backlog!

@AbhiPrasad AbhiPrasad reopened this Mar 31, 2023
@getsentry getsentry deleted a comment from github-actions bot Mar 31, 2023
@AbhiPrasad AbhiPrasad added Package: core Issues related to the Sentry Core SDK Status: Backlog and removed Status: Stale labels Mar 31, 2023
@zemlanin
Copy link

zemlanin commented Jul 8, 2024

Hi. What is expected way of handling user consent until this issue is resolved?

Add <script>/call Sentry.init only after user has agreed to gathering analytics? Something else?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 8, 2024
@lforst
Copy link
Member

lforst commented Jul 8, 2024

@zemlanin Calling Sentry.init() only when consent was given is one way to do it. Another would be to delay events in the transport, that way you would not lose events that happened before the user gave consent. But that is a bit more involved.

@timfish
Copy link
Collaborator

timfish commented Oct 31, 2024

The offline transports have hooks that can allow you to queue events until user consent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: core Issues related to the Sentry Core SDK Type: Improvement
Projects
Status: No status
Development

No branches or pull requests

7 participants