def _test(): transaction = current_transaction() for i in range(128): transaction.add_custom_parameter('txn_attr%i' % i, 'txnValue') if i < 64: add_custom_span_attribute('span_attr%i' % i, 'spanValue')
def _test(): transaction = current_transaction() transaction._sampled = True with trace_type(*args): add_custom_span_attribute('trace1_a', 'foobar') add_custom_span_attribute('trace1_b', 'barbaz') add_custom_span_attribute('invalid_value', sys.maxsize + 1)
def test_span_user_attribute_overrides_transaction_attribute(): transaction = current_transaction() transaction.add_custom_parameter('foo', 'a') add_custom_span_attribute('foo', 'b') transaction.add_custom_parameter('foo', 'c')