File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,21 @@ def test_set_meaurement_public_api(sentry_init, capture_events):
295295 assert event ["measurements" ]["metric.bar" ] == {"value" : 456 , "unit" : "second" }
296296
297297
298+ def test_set_measurement_deprecated (sentry_init ):
299+ sentry_init (traces_sample_rate = 1.0 )
300+
301+ with start_transaction (name = "measuring stuff" ) as trx :
302+ with pytest .warns (DeprecationWarning ):
303+ set_measurement ("metric.foo" , 123 )
304+
305+ with pytest .warns (DeprecationWarning ):
306+ trx .set_measurement ("metric.bar" , 456 )
307+
308+ with start_span (op = "measuring span" ) as span :
309+ with pytest .warns (DeprecationWarning ):
310+ span .set_measurement ("metric.baz" , 420.69 , unit = "custom" )
311+
312+
298313@pytest .mark .parametrize (
299314 "trace_propagation_targets,url,expected_propagation_decision" ,
300315 [
You can’t perform that action at this time.
0 commit comments