MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / showSpanDropWarning

Function showSpanDropWarning

packages/core/src/utils/spanUtils.ts:447–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445 * Logs a warning once if `beforeSendSpan` is used to drop spans.
446 */
447export function showSpanDropWarning(): void {
448 if (!hasShownSpanDropWarning) {
449 consoleSandbox(() => {
450 // eslint-disable-next-line no-console
451 console.warn(
452 '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',
453 );
454 });
455 hasShownSpanDropWarning = true;
456 }
457}
458
459/**
460 * Updates the name of the given span and ensures that the span name is not

Callers 3

createSpanEnvelopeFunction · 0.90
processBeforeSendFunction · 0.90

Calls 2

consoleSandboxFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected