Open Lms24 opened 1 month ago
What happens when moving away from a Lambda function that was originally instrumented via the integration to manually upgrading and managing the lambda layer
btw we didn't bother adding AWS support in .NET because most .NET ppl use Azure. We added GCP early on because it was like 10 lines of code, but adoption is extremely low.
Problem Statement
Currently, there are multiple ways how we instruct users to install Sentry SDKs in their AWS Lambda functions, one of them being the Sentry AWS Lambda Integration. This integration is currently un-owned and at least for NodeJS problematic because it does not support ESM-based lambdas. Therefore, the SDK team decided to sunset the integration.
Current state of AWS Lambda setup documentation
- In-product onboarding prmarily recommends and integrates our AWS Lambda Integration   but it also provides a fallback to manual setup (which only shows CJS and NPM package-based setup:  - SDK Docs show our recommended way of using the function: Adding a layer to the Lambda functions and initializing the SDK via environment variables. In JS-ESM specific guides, we recommend an NPM-based approach due to the lack of a functioning ESM Lambda layer. Improving this is tracked in https://github.com/getsentry/sentry-javascript/issues/12856 and out of scope for this issue. Examples: [Node (CJS)](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/install/cjs-layer/), [Node (ESM)](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/install/esm-npm/), [Python](https://docs.sentry.io/platforms/python/integrations/aws-lambda/manual-layer/), [.NET](https://docs.sentry.io/platforms/dotnet/guides/aws-lambda/) (which AFAICT, is not supported in the integration and doesn't publish a layer) - [Cloud Monitoring docs](https://docs.sentry.io/organization/integrations/cloud-monitoring/aws-lambda/) only mention our AWS integration with a few caveats that it doesn't work in certain scenarios (e.g. Node ESM lambdas).
Solution Brainstorm
After an internal discussion, we decided to sunset our AWS Lamda integration.
Why sunset out AWS Lambda integration?
tracesSampleRate
of1.0
.From a user's PoV, the integration therefore:
In contrast to the integration, our recommended approaches will show the easiest manual setup path per platform. This usually means adding a Lambda layer and setting environment variables. In special cases (JS ESM, .NET), it currently requires more manual setup/code modifications. But these are required anyway and the integration couldn't have helped us here. Terraform/Lambda abstraction users can simply replace the manual layer and env variable setup with their IaC strategy.
Course of Action
Sunsetting the AWS integration involves multiple steps:
Once we pick this up, we can extract these steps into dedicated sub issues
Customer Impact
Product Area
Integrations, Onboarding, SDK Docs, Product Docs