(name = "request", options?: Tracer.SpanOptions)
| 40 | }) |
| 41 | |
| 42 | const withRequestSpan = (name = "request", options?: Tracer.SpanOptions) => <R, E, A>(f: Effect.Effect<A, E, R>) => |
| 43 | Effect.andThen( |
| 44 | getRC, |
| 45 | (ctx) => |
| 46 | f.pipe( |
| 47 | Effect.withSpan(name, { |
| 48 | ...options, |
| 49 | attributes: { ...spanAttributes({ ...ctx, name: NonEmptyString255(name) }), ...options?.attributes } |
| 50 | }, { |
| 51 | captureStackTrace: options?.captureStackTrace ?? false |
| 52 | }), |
| 53 | // TODO: false |
| 54 | // request context info is picked up directly in the logger for annotations. |
| 55 | Effect.withLogSpan(name) |
| 56 | ) |
| 57 | ) |
| 58 | |
| 59 | export interface SetupRequestOptions { |
| 60 | readonly withTransaction?: boolean |
no test coverage detected
searching dependent graphs…