Skip to content
New issue

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

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

Already on GitHub? # to your account

User Consent - Allow manual sending of events #1780

Open
Tracked by #1044 ...
ghost opened this issue Dec 7, 2021 · 7 comments
Open
Tracked by #1044 ...

User Consent - Allow manual sending of events #1780

ghost opened this issue Dec 7, 2021 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented Dec 7, 2021

Problem Statement

Currently sending of events seems to be fully automatic.
I want to ask my users for consent before sending the crash report.

Solution Brainstorm

I'm interested in the SDKs for Java, iOS & macOS.

Crashlytics has the following methods:

  • setCrashlyticsCollectionEnabled(boolean enabled) to enable automatic sending of events
  • checkForUnsentReports() to check if I should show a promt asking the user
  • sendUnsentReports() to send the report (after the user aggreed to)
  • deleteUnsentReports() to delete them if the user does not want to send the report
@getsentry-release
Copy link
Collaborator

Routing to @getsentry/team-webplatform for triage. ⏲️

@getsentry-release
Copy link
Collaborator

Routing to @getsentry/team-mobile for triage. ⏲️

@marandaneto
Copy link
Contributor

@bruno-garcia ^ user consent request.

@marandaneto
Copy link
Contributor

@AshStefanOltmann a built-in feature for that makes sense, but we're not there yet, thanks for reporting.

there are workarounds tho, you can decide to initialize or not the SDK depending on the user consent, or enable and disable the SDK if necessary afterwards.

you can also filter out events if the user has not given user consent https://docs.sentry.io/platforms/android/configuration/filtering/

what we don't have is, the SDK is enabled but not sending events, and later you decide to send all the events.
a similar request is here getsentry/sentry-java#1752

the same workarounds are possible for iOS

@bruno-garcia
Copy link
Member

I'll move this to the sentry-cocoa SDK since the sentry-java already has one and this is an SDK specific request.

@bruno-garcia bruno-garcia transferred this issue from getsentry/sentry Apr 26, 2022
@bruno-garcia bruno-garcia changed the title Allow manual sending of events User Consent - Allow manual sending of events Apr 26, 2022
@brustolin brustolin moved this from Needs Discussion to Backlog in Mobile SDKs Apr 28, 2022
@philipphofmann
Copy link
Member

While we don't have this feature yet, you could somehow build a similar behavior on your own. You can use setup the SDK with SentryOpitons.enabled = false, so nothing gets sent to Sentry. You could use SentryOptions.onCrashedLastRun to check if the app crashed on a previous run and then change the options flag to SentryOpitons.enabled = false.

@vaind
Copy link
Collaborator

vaind commented Oct 25, 2022

FYI this is a P1 in getsentry/team-mobile#24 while being a P3 here

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests