8000 Merge branch 'master' into potel-base · getsentry/sentry-python@d145612 · GitHub
[go: up one dir, main page]

Skip to content

Commit d145612

Browse files
committed
Merge branch 'master' into potel-base
2 parents 2753fac + 5715734 commit d145612

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ You need to have an AWS account and AWS CLI installed and setup.
182182

183183
We put together two helper functions that can help you with development:
184184

185-
- `./scripts/aws-deploy-local-layer.sh`
185+
- `./scripts/aws/aws-deploy-local-layer.sh`
186186

187-
This script [scripts/aws-deploy-local-layer.sh](scripts/aws-deploy-local-layer.sh) will take the code you have checked out locally, create a Lambda layer out of it and deploy it to the `eu-central-1` region of your configured AWS account using `aws` CLI.
187+
This script [scripts/aws/aws-deploy-local-layer.sh](scripts/aws/aws-deploy-local-layer.sh) will take the code you have checked out locally, create a Lambda layer out of it and deploy it to the `eu-central-1` region of your configured AWS account using `aws` CLI.
188188

189189
The Lambda layer will have the name `SentryPythonServerlessSDK-local-dev`
190190

191-
- `./scripts/aws-attach-layer-to-lambda-function.sh`
191+
- `./scripts/aws/aws-attach-layer-to-lambda-function.sh`
192192

193-
You can use this script [scripts/aws-attach-layer-to-lambda-function.sh](scripts/aws-attach-layer-to-lambda-function.sh) to attach the Lambda layer you just deployed (using the first script) onto one of your existing Lambda functions. You will have to give the name of the Lambda function to attach onto as an argument. (See the script for details.)
193+
You can use this script [scripts/aws/aws-attach-layer-to-lambda-function.sh](scripts/aws/aws-attach-layer-to-lambda-function.sh) to attach the Lambda layer you just deployed (using the first script) onto one of your existing Lambda functions. You will have to give the name of the Lambda function to attach onto as an argument. (See the script for details.)
194194

195195
With these two helper scripts it should be easy to rapidly iterate your development on the Lambda layer.

sentry_sdk/integrations/spark/spark_driver.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ def _set_app_properties():
3131

3232
spark_context = SparkContext._active_spark_context
3333
if spark_context:
34-
spark_context.setLocalProperty("sentry_app_name", spark_context.appName)
3534
spark_context.setLocalProperty(
36-
"sentry_application_id", spark_context.applicationId
35+
"sentry_app_name",
36+
spark_context.appName,
37+
)
38+
spark_context.setLocalProperty(
39+
"sentry_application_id",
40+
spark_context.applicationId,
3741
)
3842

3943

@@ -231,12 +235,14 @@ def _add_breadcrumb(
231235
data=None, # type: Optional[dict[str, Any]]
232236
):
233237
# type: (...) -> None
234-
sentry_sdk.get_global_scope().add_breadcrumb(
238+
sentry_sdk.get_isolation_scope().add_breadcrumb(
235239
level=level, message=message, data=data
236240
)
237241

238242
def onJobStart(self, jobStart): # noqa: N802,N803
239243
# type: (Any) -> None
244+
sentry_sdk.get_isolation_scope().clear_breadcrumbs()
245+
240246
message = "Job {} Started".format(jobStart.jobId())
241247
self._add_breadcrumb(level="info", message=message)
242248
_set_app_properties()

0 commit comments

Comments
 (0)
0