File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -882,15 +882,6 @@ def sync_wrapper(*args, **kwargs):
882
882
return span_decorator
883
883
884
884
885
- def set_span_errored (span = None ):
886
- # type: (Optional[Span]) -> None
887
- span = span or get_current_span ()
888
- if span is not None :
889
- span .set_status (SPANSTATUS .ERROR )
890
- if span .containing_transaction is not None :
891
- span .containing_transaction .set_status (SPANSTATUS .ERROR )
892
-
893
-
894
885
def get_current_span (scope = None ):
895
886
# type: (Optional[sentry_sdk.Scope]) -> Optional[Span]
896
887
"""
@@ -901,6 +892,19 @@ def get_current_span(scope=None):
901
892
return current_span
902
893
903
894
895
+ def set_span_errored (span = None ):
896
+ # type: (Optional[Span]) -> None
897
+ """
898
+ Set the status of the current or given span to ERROR.
899
+ Also sets the status of the transaction (root span) to ERROR.
900
+ """
901
+ span = span or get_current_span ()
902
+ if span is not None :
903
+ span .set_status (SPANSTATUS .ERROR )
904
+ if span .containing_transaction is not None :
905
+ span .containing_transaction .set_status (SPANSTATUS .ERROR )
906
+
907
+
904
908
def _generate_sample_rand (
905
909
trace_id , # type: Optional[str]
906
910
* ,
You can’t perform that action at this time.
0 commit comments