File tree 1 file changed +3
-3
lines changed
sentry_sdk/integrations/spark
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 10
10
from typing import Optional
11
11
12
12
from sentry_sdk ._types import Event , Hint
13
+ from pyspark import SparkContext
13
14
14
15
15
16
class SparkIntegration (Integration ):
@@ -38,7 +39,7 @@ def _set_app_properties():
38
39
39
40
40
41
def _start_sentry_listener (sc ):
41
- # type: (Any ) -> None
42
+ # type: (SparkContext ) -> None
42
43
"""
43
44
Start java gateway server to add custom `SparkListener`
44
45
"""
@@ -51,7 +52,7 @@ def _start_sentry_listener(sc):
51
52
52
53
53
54
def _add_event_processor (sc ):
54
- # type: (Any ) -> None
55
+ # type: (SparkContext ) -> None
55
56
scope = sentry_sdk .get_isolation_scope ()
56
57
57
58
@scope .add_event_processor
@@ -88,7 +89,6 @@ def process_event(event, hint):
88
89
89
90
def _activate_integration (sc ):
90
91
# type: (SparkContext) -> None
91
- from pyspark import SparkContext
92
92
93
93
_start_sentry_listener (sc )
94
94
_set_app_properties ()
You can’t perform that action at this time.
0 commit comments