File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5
5
from datetime import datetime
6
6
7
7
import sentry_sdk
8
- from sentry_sdk .utils import capture_internal_exceptions
8
+ from sentry_sdk .utils import capture_internal_exceptions , logger
9
9
from sentry_sdk ._compat import PY2
10
10
from sentry_sdk ._types import MYPY
11
11
@@ -272,9 +272,9 @@ def finish(self, hub=None):
272
272
# resolved to a concrete decision. If `sampled` is `None`, it's
273
273
# likely that somebody used `with sentry_sdk.Hub.start_span(..)` on a
274
274
# non-transaction span and later decided to make it a transaction.
275
- assert (
276
- self . sampled is not None
277
- ), "Need to set transaction when entering span!"
275
+ if self . sampled is None :
276
+ logger . warning ( "Discarding transaction Span without sampling decision" )
277
+
278
278
return None
279
279
280
280
return hub .capture_event (
You can’t perform that action at this time.
0 commit comments