(name = "request", options?: Tracer.SpanOptions & SetupRequestOptions)
| 80 | |
| 81 | export const setupRequestContextFromCurrent = |
| 82 | (name = "request", options?: Tracer.SpanOptions & SetupRequestOptions) => <R, E, A>(self: Effect.Effect<A, E, R>) => |
| 83 | self |
| 84 | .pipe( |
| 85 | options?.withTransaction === true ? withSqlTransaction : (_) => _, |
| 86 | withRequestSpan(name, options), |
| 87 | Effect.provide(requestStateLayer, { local: true }) |
| 88 | ) |
| 89 | |
| 90 | // Streaming variant: binds ContextMapContainer to the ambient (request) scope so its |
| 91 | // finalizer (clear()) runs only after the response body is fully drained, not when the |
no test coverage detected
searching dependent graphs…