Skip to content

feat: Remove SentryOptions.enabled #736

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

Merged
merged 2 commits into from
Sep 25, 2020
Merged

Conversation

philipphofmann
Copy link
Member

📜 Description

Other SentrySDKs don't have this option. We want to align with them and remove it.
Furthermore, SentryClient now doesn't send any events or sessions if the DSN is nil.

💡 Motivation and Context

Other SentrySDKs don't have this option. We want to align with them and remove it.

💚 How did you test it?

Travis.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the CHANGELOG
  • No breaking changes

🔮 Next steps

Sorry, something went wrong.

Other SentrySDKs don't have this options. We want to align with them and remove it.
Furthermore SentryClient now doesn't send any events or sessions if the DSN is nil.
@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2020

Codecov Report

Merging #736 into master will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #736      +/-   ##
==========================================
+ Coverage   91.92%   92.06%   +0.13%     
==========================================
  Files          71       71              
  Lines        3071     3061      -10     
==========================================
- Hits         2823     2818       -5     
+ Misses        248      243       -5     
Impacted Files Coverage Δ
Sources/Sentry/SentryClient.m 91.42% <100.00%> (+0.12%) ⬆️
Sources/Sentry/SentryOptions.m 100.00% <100.00%> (ø)
Sources/Sentry/SentryThreadInspector.m 100.00% <0.00%> (+3.57%) ⬆️
Sources/Sentry/SentrySDK.m 61.44% <0.00%> (+4.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4434168...3eea489. Read the comment docs.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! deleted code replaced with testing the correct behavior!

@philipphofmann philipphofmann merged commit da7a6a5 into master Sep 25, 2020
@philipphofmann philipphofmann deleted the feat/remove-enabled branch September 25, 2020 07:18
@eric
Copy link

eric commented Oct 21, 2020

This is really a bummer. We relied on this to easily enable/disable sending to Sentry based on user privacy settings. It doesn't appear that there is any other mechanism we can use at runtime to enable and disable sending to Sentry.

@philipphofmann
Copy link
Member Author

@eric someone already opened up a PR for this #700, but didn't continue with our feedback. Maybe we just grab it ourselves and finish it. You are also welcome to help us out on this one.

@lhunath
Copy link
Contributor

lhunath commented Oct 21, 2020

@philipphofmann It should be noted that #700 cannot (in its current form) be used for toggling the state of Sentry based on the user's privacy preferences / consent, since it's read-only.

@eric
Copy link

eric commented Oct 21, 2020

Honestly the feature we’re looking for is exactly what this feature did. We need something we can toggle at runtime. If I were to propose a new feature, it would be just reverting this pull request.

@lhunath
Copy link
Contributor

lhunath commented Oct 22, 2020

I understand there's a rational for homogenizing the different platform SDKs, but in doing so has Sentry considered the impact that the solution of removing enabled has on the use case of consent management or was this effect not considered as part of this decision? If yes, I'd be keen to hear what the conclusion was and whether there's an alternative suggestion for handling consent. If no, I recommend that Sentry both consider consent management now and also adopts a more conscientious strategy to modifying existing API.

@philipphofmann
Copy link
Member Author

philipphofmann commented Oct 22, 2020

@eric and @lhunath thanks a lot for your input. I opened up an issue for this. Let's move the discussion there please: #809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants