Skip to content

Commit 339b4b7

Browse files
committed
no start_transaction
1 parent d1e57a3 commit 339b4b7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/integrations/asyncpg/test_asyncpg.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from asyncpg import connect, Connection
2121
from freezegun import freeze_time
2222

23-
from sentry_sdk import capture_message, start_transaction
23+
from sentry_sdk import capture_message, start_span
2424
from sentry_sdk.integrations.asyncpg import AsyncPGIntegration
2525
from sentry_sdk.consts import SPANDATA
2626
from sentry_sdk.tracing_utils import record_sql_queries
@@ -498,7 +498,7 @@ async def test_query_source_disabled(sentry_init, capture_events):
498498

499499
events = capture_events()
500500

501-
with start_transaction(name="test_transaction", sampled=True):
501+
with start_span(name="test_span"):
502502
conn: Connection = await connect(PG_CONNECTION_URI)
503503

504504
await conn.execute(
@@ -537,7 +537,7 @@ async def test_query_source_enabled(
537537

538538
events = capture_events()
539539

540-
with start_transaction(name="test_transaction", sampled=True):
540+
with start_span(name="test_span"):
541541
conn: Connection = await connect(PG_CONNECTION_URI)
542542

543543
await conn.execute(
@@ -570,7 +570,7 @@ async def test_query_source(sentry_init, capture_events):
570570

571571
events = capture_events()
572572

573-
with start_transaction(name="test_transaction", sampled=True):
573+
with start_span(name="test_span"):
574574
conn: Connection = await connect(PG_CONNECTION_URI)
575575

576576
await conn.execute(
@@ -622,7 +622,7 @@ async def test_query_source_with_module_in_search_path(sentry_init, capture_even
622622

623623
from asyncpg_helpers.helpers import execute_query_in_connection
624624

625-
with start_transaction(name="test_transaction", sampled=True):
625+
with start_span(name="test_span"):
626626
conn: Connection = await connect(PG_CONNECTION_URI)
627627

628628
await execute_query_in_connection(
@@ -666,7 +666,7 @@ async def test_no_query_source_if_duration_too_short(sentry_init, capture_events
666666

667667
events = capture_events()
668668

669-
with start_transaction(name="test_transaction", sampled=True):
669+
with start_span(name="test_span"):
670670
conn: Connection = await connect(PG_CONNECTION_URI)
671671

672672
@contextmanager
@@ -716,7 +716,7 @@ async def test_query_source_if_duration_over_threshold(sentry_init, capture_even
716716

717717
events = capture_events()
718718

719-
with start_transaction(name="test_transaction", sampled=True):
719+
with start_span(name="test_span"):
720720
conn: Connection = await connect(PG_CONNECTION_URI)
721721

722722
@contextmanager
@@ -781,7 +781,7 @@ async def test_span_origin(sentry_init, capture_events):
781781

782782
events = capture_events()
783783

784-
with start_transaction(name="test_transaction"):
784+
with start_span(name="test_span"):
785785
conn: Connection = await connect(PG_CONNECTION_URI)
786786

787787
await conn.execute("SELECT 1")

0 commit comments

Comments
 (0)