-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Debug.LogError
s are landing in the production
environment, despite SentryOptionsConfigurationObject
settings
#1951
Comments
Hey @wyattPD, thanks for the detailed issue description! The way you expect the SDK to behave is exactly how it should. I do get the log during build And issues reported from either layer both have the environment set. Could you give the current version a try? Or maybe provide a minimal repro so I can debug this locally? |
Thanks for the quick response @bitsandfoxes I'll see what I can do. |
Hi again! I'm trying to use Here's the chunk of the relevant log:
I am unable to complete an iOS build to test |
@wyattPD fyi I use 2022.3.41f1 unity3D
|
Thanks for that. The fix for the iOS native bridge issue is coming with #1963 |
@bitsandfoxes could you mention my github id on that issue? |
Of course! Do you want to create your own PR instead? I'm more than happy to merge it. |
I feel honored to create my first PR with your help! |
Hi again! Thanks for the fast turnaround on the fix! How should I pull in this change to test my build? Is there a different branch I should point to than |
I'm working on getting a |
Environment
How do you use Sentry?
Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
We use Sentry SaaS.
Which version of the SDK?
2.4.0
How did you install the package? (Git-URL, Assetstore)
Git-URL
Which version of Unity?
2022.3.37f1
Is this happening in Unity (editor) or on a player like Android, iOS, Windows?
Android, iOS
Steps to Reproduce
SentryOptionsConfigurationObject
via the Sentry SDK UI (this replaces the Build/Run time configuration objects)Environment
field topd_dev
orpd_prod
depending on the context of the build. We do not use the wordproduction
which is Sentry's default bucket if we left this blank.Debug.Log
eg:"Hello I am in the [dev] environment"
Debug.LogError("Hello, i am error!")
UnityEngine.Diagnostics.Utils.ForceCrash(ForcedCrashCategory.Abort)
(this will force the app to crash)Expected Result
At build-time:
At runtime, on device:
pd_prod
/pd_dev
environment.Actual Result
At build-time:
At runtime, on device:
SentryOptionsConfigurationObject
did not execute at runtime.pd_dev
/pd_prod
environment corresponding to how the project was built.Debug.LogError
) the log message shows up inproduction
-- as if I didn't set an environment at all!Known workaround
I've found as a workaround I can setup a
Scope
with the environment and that behaves as expected. However, I can't setup the scope right away, so some errors are still leaking intoproduction
. When errors leak intoproduction
I can't tell if they were from prod or dev.The text was updated successfully, but these errors were encountered: