MCPcopy
hub / github.com/triggerdotdev/trigger.dev / startSpan

Method startSpan

packages/core/src/v3/tracer.ts:105–128  ·  view source on GitHub ↗
(name: string, options?: SpanOptions, ctx?: Context)

Source from the content-addressed store, hash-verified

103 }
104
105 startSpan(name: string, options?: SpanOptions, ctx?: Context) {
106 const parentContext = ctx ?? context.active();
107
108 const attributes = options?.attributes ?? {};
109
110 const span = this.tracer.startSpan(name, options, ctx);
111
112 this.tracer
113 .startSpan(
114 name,
115 {
116 ...options,
117 attributes: {
118 ...attributes,
119 [SemanticInternalAttributes.SPAN_PARTIAL]: true,
120 [SemanticInternalAttributes.SPAN_ID]: span.spanContext().spanId,
121 },
122 },
123 parentContext
124 )
125 .end();
126
127 return span;
128 }
129}

Callers 5

startActiveSpanMethod · 0.80
onThrowFunction · 0.80
doFetchRequestFunction · 0.80
#doWorkMethod · 0.80
#doWorkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected