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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: AwsLambdaWeb
description: "Adds AWS Lambda metadata to errors and spans from Lambda Web Functions. (default)"
supportedCategories:
- server
notSupported:
- javascript.aws-lambda
- javascript.gcp-functions
- javascript.azure-functions
- javascript.bun
- javascript.deno
- javascript.cloudflare
---

<Alert>

This integration only works in the Node.js runtime and requires SDK version `11.11.0` or higher.

</Alert>

_Import name: `Sentry.awsLambdaWebIntegration`_

This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

The `awsLambdaWebIntegration` adds AWS Lambda metadata, such as the request ID, endpoint name, and cold start, to errors and spans when your app runs as an [AWS Lambda Web Function](https://docs.aws.amazon.com/lambda/latest/dg/web-functions.html). Outside of a Web Function, it does nothing.

For Lambda Event Functions, use the [AWS Lambda SDK](/platforms/javascript/guides/aws-lambda/) instead.

```JavaScript
Sentry.init({
integrations: [Sentry.awsLambdaWebIntegration()],
});
```
9 changes: 9 additions & 0 deletions docs/platforms/javascript/guides/aws-lambda/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Looking for instructions on how to add Sentry without modifying your code? [Chec

</Alert>

<Alert title="Event Functions or Web Functions?">

AWS Lambda offers two function types for Node.js, and each needs a different Sentry setup:

- **[Lambda Event Functions](https://docs.aws.amazon.com/lambda/latest/dg/lambda-functions-chapter.html)** run a handler that Lambda invokes in response to events, such as API Gateway requests or SQS messages. Use the `@sentry/aws-serverless` SDK described on this page.
- **[Lambda Web Functions](https://docs.aws.amazon.com/lambda/latest/dg/web-functions.html)** run a standard HTTP server, like Express or Hono, that listens on a port and has no Lambda handler. Use the [Node.js SDK](/platforms/javascript/guides/node/) instead. Its default [`awsLambdaWebIntegration`](/platforms/javascript/guides/node/configuration/integrations/awslambdaweb/) adds Lambda metadata, like request IDs and cold starts, to your errors and spans.

</Alert>

On this page you'll get an overview how to install, configure and use Sentry in your AWS Lambda functions. Once set up, our SDK will automatically report error and performance data from your Lambda Functions. Issues in Sentry will automatically include cloudwatch data, function details and execution time measurements.

## Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
| [`togetherAIIntegration`](./together-ai/) | ✓ | | ✓ | |
| [`typesafeIntegration`](./typesafe/) | ✓ | | ✓ | |
| [`anrIntegration`](./anr/) | | ✓ | | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`captureConsoleIntegration`](./captureconsole/) | | | | ✓ |
| [`eventLoopBlockIntegration`](./event-loop-block/) | | ✓ | | |
| [`dataloaderIntegration`](./dataloader/) | | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
| [`togetherAIIntegration`](./together-ai/) | ✓ | | ✓ | |
| [`typesafeIntegration`](./typesafe/) | ✓ | | ✓ | |
| [`anrIntegration`](./anr/) | | ✓ | | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`captureConsoleIntegration`](./captureconsole/) | | | | ✓ |
| [`eventLoopBlockIntegration`](./event-loop-block/) | | ✓ | | |
| [`dataloaderIntegration`](./dataloader/) | | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| [`prismaIntegration`](./prisma/) | ✓ | | ✓ | |
| [`vercelAiIntegration`](./vercelai/) | ✓ | | ✓ | |
| [`anrIntegration`](./anr/) | | ✓ | | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`captureConsoleIntegration`](./captureconsole/) | | | | ✓ |
| [`eventLoopBlockIntegration`](./event-loop-block/) | | ✓ | | |
| [`dataloaderIntegration`](./dataloader/) | | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`anrIntegration`](./anr/) | | ✓ | | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`captureConsoleIntegration`](./captureconsole/) | | | | ✓ |
| [`eventLoopBlockIntegration`](./event-loop-block/) | | ✓ | | |
| [`childProcessIntegration`](./childProcess/) | ✓ | | | ✓ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Depending on whether an integration enhances the functionality of a particular r
| | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------- | :--------------: | :--------: | :---------: | :--------------------: |
| [`amqplibIntegration`](./amqplib/) | ✓ | | ✓ | |
| [`awsLambdaWebIntegration`](./awslambdaweb/) | ✓ | | | ✓ |
| [`consoleIntegration`](./console/) | ✓ | | | ✓ |
| [`contextLinesIntegration`](./contextlines/) | ✓ | ✓ | | |
| [`genericPoolIntegration`](./genericpool/) | ✓ | | ✓ | |
Expand Down
Loading