Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions docs/features/tracer.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ You can trace other class methods using the `captureMethod` decorator or any arb

Tracer can patch any [AWS SDK clients](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs-awssdkclients.html) and create traces when your application makes calls to AWS services.

!!! info
The following snippet assumes you are using the [**AWS SDK v3** for JavaScript](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/)

You can patch any AWS SDK clients by calling the `captureAWSv3Client` method:

=== "index.ts"
Expand All @@ -249,25 +246,6 @@ You can patch any AWS SDK clients by calling the `captureAWSv3Client` method:
--8<-- "examples/snippets/tracer/captureAWSv3.ts"
```

!!! info
The following two snippets assume you are using the [**AWS SDK v2** for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/welcome.html)

You can patch all AWS SDK v2 clients by calling the `captureAWS` method:

=== "index.ts"

```typescript hl_lines="7"
--8<-- "examples/snippets/tracer/captureAWSAll.ts"
```

If you're looking to shave a few microseconds, or milliseconds depending on your function memory configuration, you can patch only specific AWS SDK v2 clients using `captureAWSClient`:

=== "index.ts"

```typescript hl_lines="6"
--8<-- "examples/snippets/tracer/captureAWS.ts"
```

### Tracing HTTP requests

When your function makes outgoing requests to APIs, Tracer automatically traces those calls and adds the API to the service graph as a downstream service.
Expand Down
2 changes: 1 addition & 1 deletion examples/app/cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "tsx cdk/example-app.ts",
"app": "node cdk/example-app.ts",
"watch": {
"include": ["**"],
"exclude": [
Expand Down
5 changes: 2 additions & 3 deletions examples/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"aws-cdk-lib": "^2.237.1",
"constructs": "^10.4.5",
"source-map-support": "^0.5.21",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vitest": "^4.0.10"
},
Expand All @@ -45,8 +44,8 @@
"@aws-lambda-powertools/metrics": "^2.30.2",
"@aws-lambda-powertools/parameters": "^2.30.2",
"@aws-lambda-powertools/tracer": "^2.30.2",
"@aws-sdk/client-ssm": "^3.980.0",
"@aws-sdk/lib-dynamodb": "^3.980.0",
"@aws-sdk/client-ssm": "^3.984.0",
"@aws-sdk/lib-dynamodb": "^3.984.0",
"@middy/core": "^4.7.0",
"@types/aws-lambda": "^8.10.160",
"@types/node": "25.2.0",
Expand Down
9 changes: 4 additions & 5 deletions examples/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@
"@aws-lambda-powertools/parser": "^2.30.2",
"@aws-lambda-powertools/tracer": "^2.30.2",
"@aws-sdk/client-appconfigdata": "^3.980.0",
"@aws-sdk/client-dynamodb": "^3.980.0",
"@aws-sdk/client-secrets-manager": "^3.980.0",
"@aws-sdk/client-ssm": "^3.980.0",
"@aws-sdk/util-dynamodb": "^3.980.0",
"@aws-sdk/client-dynamodb": "^3.984.0",
"@aws-sdk/client-secrets-manager": "^3.984.0",
"@aws-sdk/client-ssm": "^3.984.0",
"@aws-sdk/util-dynamodb": "^3.984.0",
"@middy/core": "^4.7.0",
"@redis/client": "^5.10.0",
"@valkey/valkey-glide": "^2.2.6",
"aws-sdk": "^2.1693.0",
"aws-sdk-client-mock": "^4.1.0",
"zod": "^4.3.6"
},
Expand Down
2 changes: 1 addition & 1 deletion layers/cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "npx tsx bin/layers.ts",
"app": "node bin/layers.ts",
"watch": {
"include": ["**"],
"exclude": [
Expand Down
3 changes: 1 addition & 2 deletions layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"dependencies": {
"aws-cdk": "^2.1104.0",
"aws-cdk-lib": "^2.237.1",
"esbuild": "^0.27.2",
"tsx": "^4.21.0"
"esbuild": "^0.27.2"
}
}
Loading
Loading