File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/tracing/src/browser Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
64
64
* beforeNavigate is called before a pageload/navigation transaction is created and allows users to modify transaction
65
65
* context data, or drop the transaction entirely (by setting `sampled = false` in the context).
66
66
*
67
- * Note: For legacy reasons, transactions can also be dropped by returning `undefined`, though that option may
68
- * disappear in the future.
67
+ * Note: For legacy reasons, transactions can also be dropped by returning `undefined`.
69
68
*
70
69
* @param context: The context data which will be passed to `startTransaction` by default
71
70
*
@@ -201,9 +200,8 @@ export class BrowserTracing implements Integration {
201
200
} ;
202
201
const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate ( expandedContext ) : expandedContext ;
203
202
204
- // TODO (kmclb): for backwards compatibility reasons, beforeNavigate can return undefined to "drop" the transaction
205
- // (prevent it from being sent to Sentry). This can be removed in V6, after which time modifiedContext and
206
- // finalContext will be one and the same.
203
+ // For backwards compatibility reasons, beforeNavigate can return undefined to "drop" the transaction (prevent it
204
+ // from being sent to Sentry).
207
205
const finalContext = modifiedContext === undefined ? { ...expandedContext , sampled : false } : modifiedContext ;
208
206
209
207
if ( finalContext . sampled === false ) {
You can’t perform that action at this time.
0 commit comments