Skip to content

Commit e6d1421

Browse files
committed
Merge branch 'potel-base' into ivana/potel/fix-sampler
2 parents a11ff46 + 09b4a01 commit e6d1421

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

MIGRATION_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
1010

1111
- The SDK now supports Python 3.7 and higher.
1212
- `sentry_sdk.start_span` now only takes keyword arguments.
13-
- `sentry_sdk.start_transaction`/`sentry_sdk.start_span` no longer takes the following arguments: `span`, `parent_sampled`.
13+
- `sentry_sdk.start_transaction`/`sentry_sdk.start_span` no longer takes the following arguments: `span`, `parent_sampled`, `trace_id`, `span_id` or `parent_span_id`.
1414
- The `Span()` constructor does not accept a `hub` parameter anymore.
1515
- `Span.finish()` does not accept a `hub` parameter anymore.
1616
- The `Profile()` constructor does not accept a `hub` parameter anymore.

tests/integrations/aiohttp/test_aiohttp.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ async def handler(request):
535535
with start_transaction(
536536
name="/interactions/other-dogs/new-dog",
537537
op="greeting.sniff",
538-
# make trace_id difference between transactions
539-
trace_id="0123456789012345678901234567890",
540538
) as transaction:
541539
client = await aiohttp_client(raw_server)
542540
resp = await client.get("/")
@@ -572,14 +570,21 @@ async def handler(request):
572570
with start_transaction(
573571
name="/interactions/other-dogs/new-dog",
574572
op="greeting.sniff",
575-
trace_id="0123456789012345678901234567890",
576-
):
573+
) as transaction:
577574
client = await aiohttp_client(raw_server)
578575
resp = await client.get("/", headers={"bagGage": "custom=value"})
579576

580577
assert (
581-
resp.request_info.headers["baggage"]
582-
== "custom=value,sentry-trace_id=0123456789012345678901234567890,sentry-environment=production,sentry-release=d08ebdb9309e1b004c6f52202de58a09c2268e42,sentry-transaction=/interactions/other-dogs/new-dog,sentry-sample_rate=1.0,sentry-sampled=true"
578+
sorted(resp.request_info.headers["baggage"].split(","))
579+
== sorted([
580+
"custom=value",
581+
f"sentry-trace_id={transaction.trace_id}",
582+
"sentry-environment=production",
583+
"sentry-release=d08ebdb9309e1b004c6f52202de58a09c2268e42",
584+
"sentry-transaction=/interactions/other-dogs/new-dog",
585+
"sentry-sample_rate=1.0",
586+
"sentry-sampled=true",
587+
])
583588
)
584589

585590

0 commit comments

Comments
 (0)