You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/tracer.md
-34
Original file line number
Diff line number
Diff line change
@@ -454,40 +454,6 @@ Use **`POWERTOOLS_TRACER_CAPTURE_ERROR=false`** environment variable to instruct
454
454
455
455
1. You might **return sensitive** information from exceptions, stack traces you might not control
456
456
457
-
### Disabling exception capture for targeted methods and handlers
458
-
459
-
Use the `captureError: false` option in both `tracer.captureLambdaHandler()` and `tracer.captureMethod()` decorators to instruct Tracer **not** to serialize exceptions as metadata.
460
-
461
-
=== "method.ts"
462
-
463
-
```typescript hl_lines="5"
464
-
import { Tracer } from '@aws-lambda-powertools/tracer';
465
-
466
-
const tracer = new Tracer({ serviceName: 'serverlessAirline' });
467
-
class MyThing {
468
-
@tracer.captureMethod({ captureError: false })
469
-
myMethod(): string {
470
-
/* ... */
471
-
return 'foo bar';
472
-
}
473
-
}
474
-
```
475
-
476
-
=== "handler.ts"
477
-
478
-
```typescript hl_lines="6"
479
-
import { Tracer } from '@aws-lambda-powertools/tracer';
480
-
import { LambdaInterface } from '@aws-lambda-powertools/commons';
481
-
482
-
const tracer = new Tracer({ serviceName: 'serverlessAirline' });
You can use `tracer.provider` attribute to access all methods provided by the [AWS X-Ray SDK](https://docs.aws.amazon.com/xray-sdk-for-nodejs/latest/reference/AWSXRay.html).
0 commit comments