getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
217 stars 52 forks source link

Startup Tracing Integration for WebGL #1000

Open bitsandfoxes opened 2 years ago

bitsandfoxes commented 2 years ago

Currently, the startup tracing integration is disabled for WebGL due to the UnityWebRequestTransport seemingly not being ready this early in the runtime. This could be solved by creating timestamps instead of starting the spans and creating and sending the transaction after the fact.

bitsandfoxes commented 2 years ago

Another approach would be to take care of this from within the "background worker" since he is the one not ready at that him.

daverge commented 8 months ago

anything new on this topic? Is there a way to change the environement for the sentryy logs at runtime? I tried using the runtime configuration but then inspecting the code on why it doesn't work there was link refering to this issue. i see it's more than a year old. Anything new on this topic? <3 =)

bitsandfoxes commented 7 months ago

Sorry, we don't have an update on this. Regarding setting the environment, do you mind creating a new issue with details what it is that you're trying to do and how you're doing it? Setting the environment via the configuration options is the way to go.

daverge commented 7 months ago

@bitsandfoxes thanks for the reply. I am using unity 3d and i tried using the runtime configuration in order to set the environment variable. I added a debug log, and in the editor it gets called (and when throwing an exception triggered by some keyboard key, the sentry log shows the correct environment too!), but on a webGL deployement in the browser it doesn't get called (leaving the environment at the default, which is production for builds (and editor for editor)). since the 3d player is embedded in another webapp which has the orchestrating CI setup, the environments dev, test and production need to be set by that pipeline (and then read at runtime by the 3d viewer)

bitsandfoxes commented 7 months ago

That sounds like a bug, do you mind opening another issue for this? Thanks, much appreciated.