(input: unknown)
| 158 | }; |
| 159 | |
| 160 | export const captureCauseEffect = (input: unknown): Effect.Effect<string | undefined> => |
| 161 | Effect.gen(function* () { |
| 162 | const context = yield* tagCurrentSentryScopeWithCurrentOtelSpan; |
| 163 | const eventId = yield* Effect.sync(() => captureCause(input, context)); |
| 164 | if (eventId && context) { |
| 165 | yield* Effect.annotateCurrentSpan(SENTRY_EVENT_ID_ATTRIBUTE, eventId); |
| 166 | } |
| 167 | return eventId; |
| 168 | }); |
| 169 | |
| 170 | export const ErrorCaptureLive: Layer.Layer<ErrorCapture> = Layer.succeed( |
| 171 | ErrorCapture, |
no test coverage detected