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
'[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',
75
-
);
76
-
});
77
-
hasShownSpanDropWarning=true;
78
-
}
79
-
returnspan;
80
-
}
81
-
returnmodifedSpan;
82
-
}catch(error){
83
-
// Spans are captured synchronously when they end, so a throwing callback would otherwise
84
-
// propagate into whatever user code ended the span.
85
-
DEBUG_BUILD&&debug.error('The `beforeSendSpan` callback threw an error, sending the span unmodified:',error);
86
-
returnspan;
67
+
// Spans are captured synchronously when they end, so a throwing callback would otherwise
68
+
// propagate into whatever user code ended the span.
69
+
constmodifiedSpan=safeCallback(
70
+
'The `beforeSendSpan` callback threw an error, sending the span unmodified:',
71
+
()=>beforeSendSpan(span),
72
+
()=>span,
73
+
);
74
+
if(modifiedSpan){
75
+
returnmodifiedSpan;
87
76
}
77
+
78
+
if(!hasShownSpanDropWarning){
79
+
consoleSandbox(()=>{
80
+
// eslint-disable-next-line no-console
81
+
console.warn(
82
+
'[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',
0 commit comments