File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,8 @@ class Tracer extends Utility implements TracerInterface {
373
373
if ( options ?. captureError ?? true ) {
374
374
tracerRef . addErrorAsMetadata ( error as Error ) ;
375
375
} else {
376
+ // Though we aren't adding the error as metadata, we should still
377
+ // mark the segment as having an error.
376
378
tracerRef . getSegment ( ) . addErrorFlag ( ) ;
377
379
}
378
380
throw error ;
@@ -450,6 +452,8 @@ class Tracer extends Utility implements TracerInterface {
450
452
if ( options ?. captureError ?? true ) {
451
453
tracerRef . addErrorAsMetadata ( error as Error ) ;
452
454
} else {
455
+ // Though we aren't adding the error as metadata, we should still
456
+ // mark the segment as having an error.
453
457
tracerRef . getSegment ( ) . addErrorFlag ( ) ;
454
458
}
455
459
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ type TracerOptions = {
36
36
*
37
37
* class MyThing {
38
38
* @tracer .captureMethod({ captureResponse: false, captureError: false })
39
- * async myMethod() { ... }
39
+ * myMethod(): string {
40
+ * return 'foo bar';
41
+ * }
40
42
* }
41
43
* ```
42
44
*/
@@ -55,7 +57,7 @@ type TracerCaptureMethodOptions = {
55
57
*
56
58
* class MyThing implements LambdaInterface {
57
59
* @tracer .captureLambdaHandler({ captureResponse: false, captureError: false })
58
- * async handler() { ... }
60
+ * async handler(_event: any, _context: any): Promise<void> { }
59
61
* }
60
62
* ```
61
63
*/
You can’t perform that action at this time.
0 commit comments