You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we SDK behaviour differs (slightly) if we in higher level SDKs or users in general pass undefined to certain SDK init options instead of not setting them at all.
tracesSampleRate: undefined makes the hasTracingEnabled return true, while not setting it (assuming no other tracing options are set) makes hasTracingEnabled return false.
Ideally, we just call dropUndefinedKeys on the user-passed options and move on. However, for this to work we need to change the implementation of hasTracingEnabled to not differentiate between the two possibilities. Also this questions the validity of hasTracingEnabled entirely because even if no sample rates are set at all, "Tracing without Performance" should be enabled.
Description
Currently, we SDK behaviour differs (slightly) if we in higher level SDKs or users in general pass
undefinedto certain SDK init options instead of not setting them at all.Examples:
defaultIntegrations: undefinedcauses no default integrations to be installed while not settingdefaultIntegrationsmeans default integrations get installed - fixed in fix(browser): Initialize default integration ifdefaultIntegrations: undefined#13261tracesSampleRate: undefinedmakes thehasTracingEnabledreturntrue, while not setting it (assuming no other tracing options are set) makeshasTracingEnabledreturnfalse.Ideally, we just call
dropUndefinedKeyson the user-passed options and move on. However, for this to work we need to change the implementation ofhasTracingEnabledto not differentiate between the two possibilities. Also this questions the validity ofhasTracingEnabledentirely because even if no sample rates are set at all, "Tracing without Performance" should be enabled.