[v9] Passing undefined
to SDK init options should behave like not setting the options
#13262
Labels
Milestone
Description
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.Examples:
defaultIntegrations: undefined
causes no default integrations to be installed while not settingdefaultIntegrations
means default integrations get installed - fixed in fix(browser): Initialize default integration ifdefaultIntegrations: undefined
#13261tracesSampleRate: undefined
makes thehasTracingEnabled
returntrue
, while not setting it (assuming no other tracing options are set) makeshasTracingEnabled
returnfalse
.Ideally, we just call
dropUndefinedKeys
on the user-passed options and move on. However, for this to work we need to change the implementation ofhasTracingEnabled
to not differentiate between the two possibilities. Also this questions the validity ofhasTracingEnabled
entirely because even if no sample rates are set at all, "Tracing without Performance" should be enabled.The text was updated successfully, but these errors were encountered: