Skip to content

Commit ec9b286

Browse files
committed
Fixed test
1 parent cce442c commit ec9b286

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tests/integrations/stdlib/test_httplib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ def test_outgoing_trace_headers_head_sdk(sentry_init, monkeypatch):
228228
expected_outgoing_baggage_items = [
229229
"sentry-trace_id=%s" % transaction.trace_id,
230230
"sentry-sample_rate=0.5",
231+
"sentry-sampled=%s" % "true" if transaction.sampled else "false",
231232
"sentry-release=foo",
232233
"sentry-environment=production",
233234
]

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_baggage_with_tracing_disabled(sentry_init):
8383
def test_baggage_with_tracing_enabled(sentry_init):
8484
sentry_init(traces_sample_rate=1.0, release="1.0.0", environment="dev")
8585
with start_transaction() as transaction:
86-
expected_baggage = "sentry-trace_id={},sentry-environment=dev,sentry-release=1.0.0,sentry-sample_rate=1.0".format(
86+
expected_baggage = "sentry-trace_id={},sentry-environment=dev,sentry-release=1.0.0,sentry-sample_rate=1.0,sentry-sampled=true".format(
8787
transaction.trace_id
8888
)
8989
# order not guaranteed in older python versions

tests/tracing/test_integration_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ def test_dynamic_sampling_head_sdk_creates_dsc(
172172
"environment": "production",
173173
"release": "foo",
174174
"sample_rate": str(sample_rate),
175-
"sampled": True,
175+
"sampled": "true",
176176
"transaction": "Head SDK tx",
177177
"trace_id": trace_id,
178178
}
179179

180180
expected_baggage = (
181-
"sentry-environment=production,sentry-release=foo,sentry-sample_rate=%s,sentry-transaction=Head%%20SDK%%20tx,sentry-trace_id=%s"
181+
"sentry-environment=production,sentry-release=foo,sentry-sample_rate=%s,sentry-transaction=Head%%20SDK%%20tx,sentry-trace_id=%s,sentry-sampled=true"
182182
% (sample_rate, trace_id)
183183
)
184184
assert sorted(baggage.serialize().split(",")) == sorted(expected_baggage.split(","))
@@ -189,6 +189,7 @@ def test_dynamic_sampling_head_sdk_creates_dsc(
189189
"environment": "production",
190190
"release": "foo",
191191
"sample_rate": str(sample_rate),
192+
"sampled": "true",
192193
"transaction": "Head SDK tx",
193194
"trace_id": trace_id,
194195
}

0 commit comments

Comments
 (0)