File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
sentry_sdk/integrations/spark Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments