( input: unknown, context: OtelCorrelationContext | null = null, )
| 145 | }; |
| 146 | |
| 147 | export const captureCause = ( |
| 148 | input: unknown, |
| 149 | context: OtelCorrelationContext | null = null, |
| 150 | ): string | undefined => { |
| 151 | const { primary, pretty } = sentryPayloadForCause(input); |
| 152 | tagCurrentSentryScopeWithOtelContext(context); |
| 153 | return Sentry.captureException(primary, (scope) => { |
| 154 | tagSentryScopeWithOtelContext(scope, context); |
| 155 | if (pretty !== null) scope.setExtra("cause", pretty); |
| 156 | return scope; |
| 157 | }); |
| 158 | }; |
| 159 | |
| 160 | export const captureCauseEffect = (input: unknown): Effect.Effect<string | undefined> => |
| 161 | Effect.gen(function* () { |
no test coverage detected