Effect
.gen(function*($) {
const eff = yield* $(
Effect
.logInfo("constructing")
.pipe(
Effect.zipRight(
Effect.sync(() => () =>
Effect
.logInfo("processing request")
.pipe(Effect.withSpan("within-request"))
)
),
Effect.withSpan("constructing")
)
)
const rt = yield* $(Effect.runtime<never>())
rt.pipe(Runtime.runFork)(eff().pipe(Effect.withSpan("request")))
})
Effect
.gen(function*($) {
const eff = yield* $(
Effect
.logInfo("constructing")
.pipe(
Effect.zipRight(
Effect.sync(() => () =>
Effect
.logInfo("processing request")
.pipe(Effect.withSpan("within-request"))
)
),
Effect.withSpan("constructing")
)
)
const rt = yield* $(Effect.runtime<never>())
rt.pipe(Runtime.runFork)(eff().pipe(Effect.withSpan("request")))
})