-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Move LogCat prop to SentryOptions #2937
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a partial class defined in Platform/Android for SentryOptions so the properties can stay there (just not under the native binding options.Android
that map to the native SDK options:
main/src/Sentry/Platforms/Android/SentryOptions.cs
All Android specific code that can go there is better located under Platform/Android
(similar to a MAUI app structure).
We can avoid #ifdef at the top level stuff a lot this way.
@@ -1,7 +1,8 @@ | |||
#if ANDROID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could stay in Sentry/Platform/Android, no need to move it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but looking at the sample made me realize that having it under Android
had the advantage of not requiring additional #ifdef from the client app. Since the whole property is by definition Android specific.
The fact it breaks the simple explanation that's "binding the native Android SDK" is the challenge.
So I'm happy making this change, but at the same feel less strongly we must, because I see the trade off of the original approach vs this.
cc @bitsandfoxes @jamescrosswell @vaind for thoughts
It still requires #ifdef on MAUI so long as the property is only available on Android. At the same time, of we don't do that, it will get confusing that the property is there on platforms without logcat |
right it makes sense the property is only available on Android. My learning from seeing this PR is that the usage of the Android-only option is a bit awkward if sitting directly on It's easy to communicate and discover to:
vs somehow inside the |
We are renaming As I mentioned before I don't know if this is the best way forward, but wanted to share these thoughts. @vaind wdyt? |
I agree. I wouldn't move it, tbh. If we do want to make it always available (so the client code doesn't need |
Now that the binding option became Basically pulling |
Making that PR now work with what got merged on |
Addresses #2935 (Move LogCat prop to SentryOptions)