File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import sentry_sdk
6
6
import sentry_sdk .tracing
7
- from sentry_sdk import start_span
8
-
9
- from sentry_sdk .tracing import Span
10
-
11
-
12
- @pytest .mark .skip (reason = "This deprecated feature has been removed in SDK 2.0." )
13
- def test_start_span_to_start_transaction (sentry_init , capture_events ):
14
- # XXX: this only exists for backwards compatibility with code before
15
- # Transaction / start_transaction were introduced.
16
- sentry_init (traces_sample_rate = 1.0 )
17
- events = capture_events ()
18
-
19
- with start_span (transaction = "/1/" ):
20
- pass
21
-
22
- with start_span (Span (transaction = "/2/" )):
23
- pass
24
-
25
- assert len (events ) == 2
26
- assert events [0 ]["transaction" ] == "/1/"
27
- assert events [1 ]["transaction" ] == "/2/"
28
7
29
8
30
9
@pytest .mark .parametrize ("parameter_value" , (sentry_sdk .Hub (), sentry_sdk .Scope ()))
You can’t perform that action at this time.
0 commit comments