Skip to content

Commit 722550b

Browse files
committed
Cleanup
1 parent 219cca7 commit 722550b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scripts/test-lambda-locally/deploy-lambda-locally.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# exit on first error
4-
set -xe
4+
set -xeuo pipefail
55

66
# Setup local AWS Lambda environment
77

@@ -14,7 +14,7 @@ uv sync
1414

1515
# Create a deployment package of the lambda function in `lambda_function.py`.
1616
rm -rf package && mkdir -p package
17-
pip install -e ../../../sentry-python -t package/ --upgrade
17+
pip install ../../../sentry-python -t package/ --upgrade
1818
cp lambda_function.py package/
1919
cd package && zip -r ../lambda_deployment_package.zip . && cd ..
2020

scripts/test-lambda-locally/lambda_function.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import logging
2+
import os
23
import sentry_sdk
34

45
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
56
from sentry_sdk.integrations.logging import LoggingIntegration
67

78
def lambda_handler(event, context):
89
sentry_sdk.init(
9-
dsn="https://[email protected]/5461230",
10+
dsn=os.environ.get("SENTRY_DSN"),
1011
attach_stacktrace=True,
1112
integrations=[
1213
LoggingIntegration(level=logging.INFO, event_level=logging.ERROR),

0 commit comments

Comments
 (0)