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

Function spanIsSentrySpan

packages/core/src/utils/spanUtils.ts:302–304  ·  view source on GitHub ↗

* Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof. * :( So instead we approximate this by checking if it has the `getSpanJSON` method.

(span: Span)

Source from the content-addressed store, hash-verified

300 * :( So instead we approximate this by checking if it has the `getSpanJSON` method.
301 */
302function spanIsSentrySpan(span: Span): span is SentrySpan {
303 return typeof (span as SentrySpan).getSpanJSON === 'function';
304}
305
306/**
307 * Returns true if a span is sampled.

Callers 2

spanToJSONFunction · 0.85
spanToStreamedSpanJSONFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected