MCPcopy Create free account
hub / github.com/effect-app/libs / span

Function span

repos/effect/packages/platform-node/test/NodeHttpServer.test.ts:398–407  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

396 Layer.build
397 )
398 const client = yield* HttpClient.HttpClient
399 const requestSpan = yield* Effect.makeSpan("client request")
400 const body = yield* client.get("/").pipe(
401 Effect.flatMap((r) => r.json),
402 Effect.provideService(
403 Tracer.Tracer,
404 Tracer.make({
405 span(options) {
406 assert.strictEqual(options.name, "http.client GET")
407 assert.strictEqual(options.kind, "client")
408 assert(options.parent._tag === "Some")
409 if (options.parent.value._tag !== "Span") {
410 throw new Error("Expected span parent")

Callers

nothing calls this directly

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…