(span: Tracer.AnySpan, options?: Tracer.TraceOptions): <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, Exclude<R, Tracer.ParentSpan>>
<A, E, R>(
self: Layer<A, E, R>,
span: Tracer.AnySpan,
options?: Tracer.TraceOptions
): Layer<A, E, Exclude<R, Tracer.ParentSpan>>Wraps a layer so spans created during its construction use the supplied span as their parent.
Details
Use this to attach layer construction to an existing trace hierarchy. This API does not create or end the supplied parent span.
When the supplied span is a native Span, layer construction also receives
diagnostic information that helps associate failures with the layer call site.
External spans are only installed as the parent span and do not add this
diagnostic call-site information.
Example (Attaching layers to an existing parent span)
import { Context, Effect, Layer, Tracer } from "effect"
class Database extends Context.Service<Database, {
readonly query: (sql: string) => Effect.Effect<string>
}>()("Database") {}
class Cache extends Context.Service<Cache, {
readonly get: (key: string) => Effect.Effect<string | null>
}>()("Cache") {}
// Create layers
const DatabaseLayer = Layer.effect(Database, Effect.gen(function*() {
yield* Effect.log("Connecting to database")
return {
query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
}
}))
const CacheLayer = Layer.effect(Cache, Effect.gen(function*() {
yield* Effect.log("Connecting to cache")
return {
get: Effect.fn("Cache.get")((key: string) => Effect.succeed(`Cache: ${key}`))
}
}))
// Use with an existing parent span from Effect.withSpan
const program = Effect.withSpan("application-startup")(
Effect.gen(function*() {
const parentSpan = yield* Tracer.ParentSpan
// Both layers will be children of "application-startup" span
const AppLayer = Layer.mergeAll(DatabaseLayer, CacheLayer).pipe(
Layer.withParentSpan(parentSpan)
)
const context = yield* Layer.build(AppLayer)
const database = Context.get(context, Database)
const cache = Context.get(context, Cache)
const dbResult = yield* database.query("SELECT * FROM users")
const cacheResult = yield* cache.get("user:123")
return { dbResult, cacheResult }
})
)export const const withParentSpan: {
(
span: Tracer.AnySpan,
options?: Tracer.TraceOptions
): <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, Exclude<R, Tracer.ParentSpan>>
<A, E, R>(
self: Layer<A, E, R>,
span: Tracer.AnySpan,
options?: Tracer.TraceOptions
): Layer<A, E, Exclude<R, Tracer.ParentSpan>>
}
Wraps a layer so spans created during its construction use the supplied span
as their parent.
Details
Use this to attach layer construction to an existing trace hierarchy. This API
does not create or end the supplied parent span.
When the supplied span is a native Span, layer construction also receives
diagnostic information that helps associate failures with the layer call site.
External spans are only installed as the parent span and do not add this
diagnostic call-site information.
Example (Attaching layers to an existing parent span)
import { Context, Effect, Layer, Tracer } from "effect"
class Database extends Context.Service<Database, {
readonly query: (sql: string) => Effect.Effect<string>
}>()("Database") {}
class Cache extends Context.Service<Cache, {
readonly get: (key: string) => Effect.Effect<string | null>
}>()("Cache") {}
// Create layers
const DatabaseLayer = Layer.effect(Database, Effect.gen(function*() {
yield* Effect.log("Connecting to database")
return {
query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
}
}))
const CacheLayer = Layer.effect(Cache, Effect.gen(function*() {
yield* Effect.log("Connecting to cache")
return {
get: Effect.fn("Cache.get")((key: string) => Effect.succeed(`Cache: ${key}`))
}
}))
// Use with an existing parent span from Effect.withSpan
const program = Effect.withSpan("application-startup")(
Effect.gen(function*() {
const parentSpan = yield* Tracer.ParentSpan
// Both layers will be children of "application-startup" span
const AppLayer = Layer.mergeAll(DatabaseLayer, CacheLayer).pipe(
Layer.withParentSpan(parentSpan)
)
const context = yield* Layer.build(AppLayer)
const database = Context.get(context, Database)
const cache = Context.get(context, Cache)
const dbResult = yield* database.query("SELECT * FROM users")
const cacheResult = yield* cache.get("user:123")
return { dbResult, cacheResult }
})
)
withParentSpan: {
(
span: Tracer.AnySpanspan: import TracerTracer.type AnySpan =
| Tracer.Span
| Tracer.ExternalSpan
A span value that can participate in tracing, either an Effect-managed
Span or an ExternalSpan propagated from another tracing system.
Example (Accepting any span)
import { Effect, Tracer } from "effect"
// Function that accepts any span type
const logSpan = (span: Tracer.AnySpan) => {
console.log(`Span ID: ${span.spanId}, Trace ID: ${span.traceId}`)
return Effect.succeed(span)
}
// Works with both Span and ExternalSpan
const externalSpan = Tracer.externalSpan({
spanId: "span-123",
traceId: "trace-456"
})
AnySpan,
options: Tracer.TraceOptionsoptions?: import TracerTracer.TraceOptions
): <function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R>(
self: Layer<A, E, R>(parameter) self: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<A>, E, R>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
self: interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R>
) => interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, type Exclude<T, U> = T extends U
? never
: T
Exclude from T those types that are assignable to U
Exclude<function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R, import TracerTracer.class ParentSpanclass ParentSpan {
Service: Service;
key: Identifier;
}
Context service containing the Span or ExternalSpan to use as the parent
of newly-created child spans.
Example (Accessing the parent span)
import { Effect, Tracer } from "effect"
// Access the parent span from the context
const program = Effect.gen(function*() {
const parentSpan = yield* Effect.service(Tracer.ParentSpan)
console.log(`Parent span: ${parentSpan.spanId}`)
})
ParentSpan>>
<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R>(
self: Layer<A, E, R>(parameter) self: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<A>, E, R>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
self: interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R>,
span: Tracer.AnySpanspan: import TracerTracer.type AnySpan =
| Tracer.Span
| Tracer.ExternalSpan
A span value that can participate in tracing, either an Effect-managed
Span or an ExternalSpan propagated from another tracing system.
Example (Accepting any span)
import { Effect, Tracer } from "effect"
// Function that accepts any span type
const logSpan = (span: Tracer.AnySpan) => {
console.log(`Span ID: ${span.spanId}, Trace ID: ${span.traceId}`)
return Effect.succeed(span)
}
// Works with both Span and ExternalSpan
const externalSpan = Tracer.externalSpan({
spanId: "span-123",
traceId: "trace-456"
})
AnySpan,
options: Tracer.TraceOptionsoptions?: import TracerTracer.TraceOptions
): interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>E, type Exclude<T, U> = T extends U
? never
: T
Exclude from T those types that are assignable to U
Exclude<function (type parameter) R in <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>R, import TracerTracer.class ParentSpanclass ParentSpan {
Service: Service;
key: Identifier;
}
Context service containing the Span or ExternalSpan to use as the parent
of newly-created child spans.
Example (Accessing the parent span)
import { Effect, Tracer } from "effect"
// Access the parent span from the context
const program = Effect.gen(function*() {
const parentSpan = yield* Effect.service(Tracer.ParentSpan)
console.log(`Parent span: ${parentSpan.spanId}`)
})
ParentSpan>>
} = function() {
const const dataFirst: booleandataFirst = const isLayer: (
u: unknown
) => u is Layer<unknown, unknown, unknown>
Returns true if the specified value is a Layer, false otherwise.
Example (Checking whether a value is a layer)
import { Context, Effect, Layer } from "effect"
class Database extends Context.Service<Database, {
readonly query: (sql: string) => Effect.Effect<string>
}>()("Database") {}
const dbLayer = Layer.succeed(Database, {
query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
})
const notALayer = { someProperty: "value" }
console.log(Layer.isLayer(dbLayer)) // true
console.log(Layer.isLayer(notALayer)) // false
isLayer(function (local var) arguments: IArgumentsarguments[0])
const const span: Tracer.AnySpanspan: import TracerTracer.type AnySpan =
| Tracer.Span
| Tracer.ExternalSpan
A span value that can participate in tracing, either an Effect-managed
Span or an ExternalSpan propagated from another tracing system.
Example (Accepting any span)
import { Effect, Tracer } from "effect"
// Function that accepts any span type
const logSpan = (span: Tracer.AnySpan) => {
console.log(`Span ID: ${span.spanId}, Trace ID: ${span.traceId}`)
return Effect.succeed(span)
}
// Works with both Span and ExternalSpan
const externalSpan = Tracer.externalSpan({
spanId: "span-123",
traceId: "trace-456"
})
AnySpan = const dataFirst: booleandataFirst ? function (local var) arguments: IArgumentsarguments[1] : function (local var) arguments: IArgumentsarguments[0]
let let options: anyoptions = const dataFirst: booleandataFirst ? function (local var) arguments: IArgumentsarguments[2] : function (local var) arguments: IArgumentsarguments[1]
let let provideStackFrame: <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, R>
provideStackFrame: <function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>R>(self: Layer<A, E, R>(parameter) self: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<A>, E, R>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
self: interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>R>) => interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<function (type parameter) A in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>A, function (type parameter) E in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>E, function (type parameter) R in <A, E, R>(self: Layer<A, E, R>): Layer<A, E, R>R> = import identityidentity
if (const span: Tracer.AnySpanspan._tag: "Span" | "ExternalSpan"_tag === "Span") {
let options: anyoptions = import internalTracerinternalTracer.const addSpanStackTrace: <
A extends Tracer.TraceOptions
>(
options: A | undefined
) => A
addSpanStackTrace(let options: anyoptions)
let provideStackFrame: <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, R>
provideStackFrame = const provideSpanStackFrame: (
name: string,
stack: (() => string | undefined) | undefined
) => <A1, E1, R1>(
layer: Layer<A1, E1, R1>
) => Layer<A1, E1, unknown>
provideSpanStackFrame(const span: Tracer.AnySpanconst span: {
_tag: "Span";
name: string;
spanId: string;
traceId: string;
parent: Option.Option<AnySpan>;
annotations: Context.Context<never>;
status: SpanStatus;
attributes: ReadonlyMap<string, unknown>;
links: ReadonlyArray<SpanLink>;
sampled: boolean;
kind: SpanKind;
end: (endTime: bigint, exit: Exit.Exit<unknown, unknown>) => void;
attribute: (key: string, value: unknown) => void;
event: (name: string, startTime: bigint, attributes?: Record<string, unknown>) => void;
addLinks: (links: ReadonlyArray<SpanLink>) => void;
}
span.Span.name: stringname, let options: anyoptions?.captureStackTrace)
}
const const parentSpanLayer: Layer<
Tracer.ParentSpan,
never,
never
>
const parentSpanLayer: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<Tracer.ParentSpan>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
parentSpanLayer = const parentSpan: (
span: Tracer.AnySpan
) => Layer<Tracer.ParentSpan>
Constructs a layer that provides an existing span as the current parent span.
Details
The supplied span is made available through Tracer.ParentSpan for layers
that are built with this layer. This API does not create, end, or close the
span; the caller remains responsible for the span's lifetime.
Example (Referencing an existing parent span)
import { Console, Context, Effect, Layer, Tracer } from "effect"
class Database extends Context.Service<Database, {
readonly query: (sql: string) => Effect.Effect<string>
}>()("Database") {}
// Create a layer that uses an existing span as parent
const databaseLayer = Layer.effect(
Database,
Effect.gen(function*() {
yield* Effect.log("Initializing database")
const parentSpan = yield* Effect.currentParentSpan
yield* Console.log(parentSpan.spanId) // "42"
return {
query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
}
})
).pipe(Layer.provide(Layer.parentSpan(Tracer.externalSpan({
spanId: "42",
traceId: "000"
}))))
parentSpan(const span: Tracer.AnySpanspan)
if (const dataFirst: booleandataFirst) {
return const provide: {
<RIn, E, ROut>(that: Layer<ROut, E, RIn>): <
RIn2,
E2,
ROut2
>(
self: Layer<ROut2, E2, RIn2>
) => Layer<
ROut2,
E | E2,
RIn | Exclude<RIn2, ROut>
>
<Layers extends [Any, ...Array<Any>]>(
that: Layers
): <A, E, R>(
self: Layer<A, E, R>
) => Layer<
A,
E | Error<Layers[number]>,
| Services<Layers[number]>
| Exclude<R, Success<Layers[number]>>
>
<RIn2, E2, ROut2, RIn, E, ROut>(
self: Layer<ROut2, E2, RIn2>,
that: Layer<ROut, E, RIn>
): Layer<
ROut2,
E | E2,
RIn | Exclude<RIn2, ROut>
>
<A, E, R, Layers extends [Any, ...Array<Any>]>(
self: Layer<A, E, R>,
that: Layers
): Layer<
A,
E | Error<Layers[number]>,
| Services<Layers[number]>
| Exclude<R, Success<Layers[number]>>
>
}
provide(let provideStackFrame: <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, R>
provideStackFrame(function (local var) arguments: IArgumentsarguments[0]), const parentSpanLayer: Layer<
Tracer.ParentSpan,
never,
never
>
const parentSpanLayer: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<Tracer.ParentSpan>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
parentSpanLayer)
}
return (self: Layer<any, any, any>(parameter) self: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<any>, any, any>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
self: interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<any, any, any>) => const provide: {
<RIn, E, ROut>(that: Layer<ROut, E, RIn>): <
RIn2,
E2,
ROut2
>(
self: Layer<ROut2, E2, RIn2>
) => Layer<
ROut2,
E | E2,
RIn | Exclude<RIn2, ROut>
>
<Layers extends [Any, ...Array<Any>]>(
that: Layers
): <A, E, R>(
self: Layer<A, E, R>
) => Layer<
A,
E | Error<Layers[number]>,
| Services<Layers[number]>
| Exclude<R, Success<Layers[number]>>
>
<RIn2, E2, ROut2, RIn, E, ROut>(
self: Layer<ROut2, E2, RIn2>,
that: Layer<ROut, E, RIn>
): Layer<
ROut2,
E | E2,
RIn | Exclude<RIn2, ROut>
>
<A, E, R, Layers extends [Any, ...Array<Any>]>(
self: Layer<A, E, R>,
that: Layers
): Layer<
A,
E | Error<Layers[number]>,
| Services<Layers[number]>
| Exclude<R, Success<Layers[number]>>
>
}
provide(let provideStackFrame: <A, E, R>(
self: Layer<A, E, R>
) => Layer<A, E, R>
provideStackFrame(self: Layer<any, any, any>(parameter) self: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<any>, any, any>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
self), const parentSpanLayer: Layer<
Tracer.ParentSpan,
never,
never
>
const parentSpanLayer: {
build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<Tracer.ParentSpan>, never, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
parentSpanLayer)
} as any