Skip to content

Commit 1c86489

Browse files
ref(tracing): Update NoOpSpan.finish signature
Make the same changes previously made to `Transaction.finish`.
1 parent 3461068 commit 1c86489

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sentry_sdk/tracing.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,17 @@ def get_profile_context(self):
12051205
# type: () -> Any
12061206
return {}
12071207

1208-
def finish(self, hub=None, end_timestamp=None):
1209-
# type: (Optional[Union[sentry_sdk.Hub, sentry_sdk.Scope]], Optional[Union[float, datetime]]) -> Optional[str]
1208+
def finish(
1209+
self,
1210+
scope=None, # type: Optional[sentry_sdk.Scope]
1211+
end_timestamp=None, # type: Optional[Union[float, datetime]]
1212+
*,
1213+
hub=None, # type: Optional[sentry_sdk.Hub]
1214+
):
1215+
# type: (...) -> Optional[str]
1216+
"""
1217+
The `hub` parameter is deprecated. Please use the `scope` parameter, instead.
1218+
"""
12101219
pass
12111220

12121221
def set_measurement(self, name, value, unit=""):

0 commit comments

Comments
 (0)