File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/aws-serverless/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -306,11 +306,11 @@ export function wrapHandler<TEvent, TResult>(
306
306
if ( options . captureAllSettledReasons && Array . isArray ( rv ) && isPromiseAllSettledResult ( rv ) ) {
307
307
const reasons = getRejectedReasons ( rv ) ;
308
308
reasons . forEach ( exception => {
309
- captureException ( exception , scope => markEventUnhandled ( scope ) ) ;
309
+ captureException ( exception , scope => markEventUnhandled ( scope , 'aws-serverless.promise' ) ) ;
310
310
} ) ;
311
311
}
312
312
} catch ( e ) {
313
- captureException ( e , scope => markEventUnhandled ( scope ) ) ;
313
+ captureException ( e , scope => markEventUnhandled ( scope , 'aws-serverless.handler' ) ) ;
314
314
throw e ;
315
315
} finally {
316
316
clearTimeout ( timeoutWarningTimer ) ;
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ const headerGetter: TextMapGetter<APIGatewayProxyEventHeaders> = {
26
26
/**
27
27
* Marks an event as unhandled by adding a span processor to the passed scope.
28
28
*/
29
- export function markEventUnhandled ( scope : Scope ) : Scope {
29
+ export function markEventUnhandled ( scope : Scope , type = 'aws-serverless' ) : Scope {
30
30
scope . addEventProcessor ( event => {
31
- addExceptionMechanism ( event , { handled : false } ) ;
31
+ addExceptionMechanism ( event , { handled : false , type } ) ;
32
32
return event ;
33
33
} ) ;
34
34
You can’t perform that action at this time.
0 commit comments