getsentry / team-webplatform-meta

0 stars 0 forks source link

Add `enableTracing` option to SDKs #21

Closed smeubank closed 1 year ago

smeubank commented 1 year ago

Context: https://github.com/getsentry/develop/issues/769

A new simplified options for configuring to turn tracing & performance on should be added to all SDKs. For each SDK the default sample rate should be agreed upon.

Docs do not need to be updated yet, nor the onboarding wizard. This can wait until the top level options are added to a number of SDKs and we decide if we want to configure the default onboarding experience, for all new users.

Web:

Mobile meta issue.

smeubank commented 1 year ago

@cleptric it was already added to the Go SDK, but is it a breaking change there? It is actually required due to platform specifics of Go. Is that correct? No way around that?

cleptric commented 1 year ago

@smeubank It was a none-breaking change in terms of that code still compiles happily, but a breaking change in terms of that you need to set it to enable performance monitoring. If you set it, a TracesSampleRate/TracesSampler is required as well, these two options go hand in hand. I would not change this for the time being, as we have to come up with a better plan to work around Go's null values anyways, so for the moment it's good enough imo.

krystofwoldrich commented 1 year ago

What is the expected behavior of the flag?

enableTracing=true -> use default tracesSampleRate=1

enableTracing=false and tracesSampleRate=0.5 -> what should happen? will enableTracing have higher priority?

cleptric commented 1 year ago

@krystofwoldrich Have a look at https://github.com/getsentry/develop/issues/769 and https://github.com/getsentry/develop/pull/801