MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / buildSpanLinks

Function buildSpanLinks

packages/cloudflare/src/utils/traceLinks.ts:68–81  ·  view source on GitHub ↗
(storedContext: StoredSpanContext)

Source from the content-addressed store, hash-verified

66 * Builds span links from a stored span context.
67 */
68export function buildSpanLinks(storedContext: StoredSpanContext): SpanLink[] {
69 return [
70 {
71 context: {
72 traceId: storedContext.traceId,
73 spanId: storedContext.spanId,
74 traceFlags: storedContext.sampled ? TraceFlags.SAMPLED : TraceFlags.NONE,
75 },
76 attributes: {
77 [SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE]: 'previous_trace',
78 },
79 },
80 ];
81}

Callers 2

traceLinks.test.tsFile · 0.90
executeSpanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected