@@ -2784,18 +2784,18 @@ def reset_id_generator_state():
27842784 logger ._state ._reset_id_generator ()
27852785 logger ._state ._reset_context_manager ()
27862786 original_otel = os .getenv ("BRAINTRUST_OTEL_COMPAT" )
2787- original_legacy = os .getenv ("BRAINTRUST_LEGACY_UUID_IDS " )
2787+ original_legacy = os .getenv ("BRAINTRUST_LEGACY_IDS " )
27882788 try :
27892789 yield
27902790 finally :
27912791 logger ._state ._reset_id_generator ()
27922792 logger ._state ._reset_context_manager ()
27932793 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
2794- os .environ .pop ("BRAINTRUST_LEGACY_UUID_IDS " , None )
2794+ os .environ .pop ("BRAINTRUST_LEGACY_IDS " , None )
27952795 if original_otel :
27962796 os .environ ["BRAINTRUST_OTEL_COMPAT" ] = original_otel
27972797 if original_legacy :
2798- os .environ ["BRAINTRUST_LEGACY_UUID_IDS " ] = original_legacy
2798+ os .environ ["BRAINTRUST_LEGACY_IDS " ] = original_legacy
27992799
28002800
28012801def test_otel_compatible_span_export_import ():
@@ -2876,7 +2876,7 @@ def test_span_with_uuid_ids_share_root_span_id(reset_id_generator_state):
28762876
28772877 # Opt into legacy UUID IDs (hex IDs are the default).
28782878 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
2879- os .environ ["BRAINTRUST_LEGACY_UUID_IDS " ] = "true"
2879+ os .environ ["BRAINTRUST_LEGACY_IDS " ] = "true"
28802880 logger ._state ._reset_id_generator ()
28812881
28822882 init_test_logger (__name__ )
@@ -3079,9 +3079,9 @@ def test_update_span_includes_span_id_and_root_span_id_from_export(with_memory_l
30793079
30803080def test_get_exporter_returns_v4_by_default ():
30813081 """Test that _get_exporter() returns SpanComponentsV4 by default (no env vars)."""
3082- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3082+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
30833083 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3084- os .environ .pop ("BRAINTRUST_LEGACY_UUID_IDS " , None )
3084+ os .environ .pop ("BRAINTRUST_LEGACY_IDS " , None )
30853085 from braintrust .logger import _get_exporter
30863086 from braintrust .span_identifier_v4 import SpanComponentsV4
30873087
@@ -3091,9 +3091,9 @@ def test_get_exporter_returns_v4_by_default():
30913091
30923092def test_get_exporter_returns_v3_when_legacy_uuid ():
30933093 """Test that _get_exporter() returns SpanComponentsV3 in legacy UUID mode."""
3094- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3094+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
30953095 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3096- os .environ ["BRAINTRUST_LEGACY_UUID_IDS " ] = "true"
3096+ os .environ ["BRAINTRUST_LEGACY_IDS " ] = "true"
30973097 from braintrust .logger import _get_exporter
30983098 from braintrust .span_identifier_v3 import SpanComponentsV3
30993099
@@ -3114,9 +3114,9 @@ def test_get_exporter_returns_v4_when_otel_enabled():
31143114
31153115def test_experiment_export_uses_v4_by_default ():
31163116 """Test that Experiment.export() uses V4 by default."""
3117- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3117+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
31183118 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3119- os .environ .pop ("BRAINTRUST_LEGACY_UUID_IDS " , None )
3119+ os .environ .pop ("BRAINTRUST_LEGACY_IDS " , None )
31203120 experiment = init_test_exp ("test-exp" )
31213121 exported = experiment .export ()
31223122
@@ -3128,9 +3128,9 @@ def test_experiment_export_uses_v4_by_default():
31283128
31293129def test_experiment_export_uses_v3_in_legacy_mode ():
31303130 """Test that Experiment.export() uses V3 in legacy UUID mode."""
3131- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3131+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
31323132 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3133- os .environ ["BRAINTRUST_LEGACY_UUID_IDS " ] = "true"
3133+ os .environ ["BRAINTRUST_LEGACY_IDS " ] = "true"
31343134 experiment = init_test_exp ("test-exp" )
31353135 exported = experiment .export ()
31363136
@@ -3155,9 +3155,9 @@ def test_experiment_export_respects_otel_compat_enabled():
31553155
31563156def test_logger_export_uses_v4_by_default ():
31573157 """Test that Logger.export() uses V4 by default."""
3158- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3158+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
31593159 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3160- os .environ .pop ("BRAINTRUST_LEGACY_UUID_IDS " , None )
3160+ os .environ .pop ("BRAINTRUST_LEGACY_IDS " , None )
31613161 test_logger = init_test_logger (__name__ )
31623162 exported = test_logger .export ()
31633163
@@ -3169,9 +3169,9 @@ def test_logger_export_uses_v4_by_default():
31693169
31703170def test_logger_export_uses_v3_in_legacy_mode ():
31713171 """Test that Logger.export() uses V3 in legacy UUID mode."""
3172- with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_UUID_IDS " ):
3172+ with preserve_env_vars ("BRAINTRUST_OTEL_COMPAT" , "BRAINTRUST_LEGACY_IDS " ):
31733173 os .environ .pop ("BRAINTRUST_OTEL_COMPAT" , None )
3174- os .environ ["BRAINTRUST_LEGACY_UUID_IDS " ] = "true"
3174+ os .environ ["BRAINTRUST_LEGACY_IDS " ] = "true"
31753175 test_logger = init_test_logger (__name__ )
31763176 exported = test_logger .export ()
31773177
0 commit comments