MCPcopy Index your code
hub / github.com/Effect-TS/effect / span

Function span

packages/experimental/src/DevTools/Client.ts:177–198  ·  view source on GitHub ↗
(name, parent, context, links, startTime, kind, options)

Source from the content-addressed store, hash-verified

175
176 return Tracer.make({
177 span(name, parent, context, links, startTime, kind, options) {
178 const span = currentTracer.span(name, parent, context, links, startTime, kind, options)
179 client.unsafeAddSpan(span)
180 const oldEvent = span.event
181 span.event = function(this: any, name, startTime, attributes) {
182 client.unsafeAddSpan({
183 _tag: "SpanEvent",
184 traceId: span.traceId,
185 spanId: span.spanId,
186 name,
187 startTime,
188 attributes: attributes || {}
189 })
190 return oldEvent.call(this, name, startTime, attributes)
191 }
192 const oldEnd = span.end
193 span.end = function(this: any) {
194 client.unsafeAddSpan(span)
195 return oldEnd.apply(this, arguments as any)
196 }
197 return span
198 },
199 context: currentTracer.context
200 })
201}).pipe(

Callers

nothing calls this directly

Calls 1

spanMethod · 0.80

Tested by

no test coverage detected