Problem Statement
Observation - Session instrumentation handler does start sessions for each new URL state
Problem - webviews use URL to pass information between native app and webview, this triggers a lot of “fake” sessions and consumes unnecessary data.
Link to source:
| addHistoryInstrumentationHandler(({ from, to })=>{ |
| // Don't create an additional session for the initial route or if the location did not change |
| if(from!==undefined&&from!==to){ |
| startSession({ignoreDuration: true}); |
| captureSession(); |
| } |
Solution Brainstorm
This integration should support configuration options similar to how breadcrumbsIntegration works. The integration could accept options like:
interfaceBrowserSessionOptions{// Disable automatic session creation on URL changestrackUrlChanges?: boolean;// Or provide a callback to determine if session should be created shouldCreateSession?: (from: string,to: string)=>boolean;}Additional Context
Currently it's only possible to disable session tracking completely.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Problem Statement
Observation - Session instrumentation handler does start sessions for each new URL state
Problem - webviews use URL to pass information between native app and webview, this triggers a lot of “fake” sessions and consumes unnecessary data.
Link to source:
sentry-javascript/packages/browser/src/integrations/browsersession.ts
Lines 30 to 35 in ba390df
Solution Brainstorm
This integration should support configuration options similar to how breadcrumbsIntegration works. The integration could accept options like:
Additional Context
Currently it's only possible to disable session tracking completely.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.