Skip to content

Commit

Permalink
ref(tracing): Update NoOpSpan.finish signature
Browse files Browse the repository at this point in the history
Make the same changes previously made to `Transaction.finish`.
  • Loading branch information
szokeasaurusrex committed Jul 10, 2024
1 parent 3461068 commit 1c86489
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,17 @@ def get_profile_context(self):
# type: () -> Any
return {}

def finish(self, hub=None, end_timestamp=None):
# type: (Optional[Union[sentry_sdk.Hub, sentry_sdk.Scope]], Optional[Union[float, datetime]]) -> Optional[str]
def finish(
self,
scope=None, # type: Optional[sentry_sdk.Scope]
end_timestamp=None, # type: Optional[Union[float, datetime]]
*,
hub=None, # type: Optional[sentry_sdk.Hub]
):
# type: (...) -> Optional[str]
"""
The `hub` parameter is deprecated. Please use the `scope` parameter, instead.
"""
pass

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

0 comments on commit 1c86489

Please sign in to comment.