Skip to content

Commit 533a95b

Browse files
committed
Some test
1 parent f0b2f47 commit 533a95b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/tracing/test_misc.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,29 @@ def test_set_measurement_deprecated(sentry_init):
310310
span.set_measurement("metric.baz", 420.69, unit="custom")
311311

312312

313+
def test_set_meaurement_compared_to_set_data(sentry_init, capture_events):
314+
"""
315+
This is just a test to see if we can use set_data() instead of set_measurement() with
316+
the same result in the backend.
317+
"""
318+
sentry_init(traces_sample_rate=1.0)
319+
320+
events = capture_events()
321+
322+
with start_transaction(name="measuring stuff") as transaction:
323+
transaction.set_measurement("metric.foo", 123)
324+
transaction.set_data("metric.bar", 456)
325+
with start_span(op="measuring span") as span:
326+
span.set_measurement("metric.baz", 420.69, unit="custom")
327+
span.set_data("metric.qux", 789)
328+
329+
(event,) = events
330+
from pprint import pprint
331+
332+
pprint(event)
333+
raise AssertionError("This test is not finished yet.")
334+
335+
313336
@pytest.mark.parametrize(
314337
"trace_propagation_targets,url,expected_propagation_decision",
315338
[

0 commit comments

Comments
 (0)