@@ -16,7 +16,7 @@ def mock_traceloop_components():
1616 'exporter' : stack .enter_context (patch ('sap_cloud_sdk.core.telemetry.auto_instrument.OTLPSpanExporter' )),
1717 'transformer' : stack .enter_context (patch ('sap_cloud_sdk.core.telemetry.auto_instrument.GenAIAttributeTransformer' )),
1818 'create_resource' : stack .enter_context (patch ('sap_cloud_sdk.core.telemetry.auto_instrument.create_resource_attributes_from_env' )),
19- 'get_conhos_app_name ' : stack .enter_context (patch ('sap_cloud_sdk.core.telemetry.auto_instrument._get_conhos_app_name ' )),
19+ 'get_app_name ' : stack .enter_context (patch ('sap_cloud_sdk.core.telemetry.auto_instrument._get_app_name ' )),
2020 }
2121 yield mocks
2222
@@ -37,7 +37,7 @@ def test_auto_instrument_without_endpoint(self):
3737
3838 def test_auto_instrument_with_endpoint_success (self , mock_traceloop_components ):
3939 """Test successful auto-instrumentation with valid endpoint."""
40- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
40+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
4141 mock_traceloop_components ['create_resource' ].return_value = {'service.name' : 'test-app' }
4242
4343 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317' }, clear = True ):
@@ -52,7 +52,7 @@ def test_auto_instrument_with_endpoint_success(self, mock_traceloop_components):
5252
5353 def test_auto_instrument_appends_v1_traces_to_endpoint (self , mock_traceloop_components ):
5454 """Test that auto_instrument appends /v1/traces to endpoint if not present."""
55- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
55+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
5656 mock_traceloop_components ['create_resource' ].return_value = {}
5757
5858 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317' }, clear = True ):
@@ -65,7 +65,7 @@ def test_auto_instrument_appends_v1_traces_to_endpoint(self, mock_traceloop_comp
6565
6666 def test_auto_instrument_preserves_existing_v1_traces (self , mock_traceloop_components ):
6767 """Test that auto_instrument doesn't duplicate /v1/traces if already present."""
68- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
68+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
6969 mock_traceloop_components ['create_resource' ].return_value = {}
7070
7171 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317/v1/traces' }, clear = True ):
@@ -78,7 +78,7 @@ def test_auto_instrument_preserves_existing_v1_traces(self, mock_traceloop_compo
7878
7979 def test_auto_instrument_creates_resource_with_attributes (self , mock_traceloop_components ):
8080 """Test that auto_instrument creates resource with correct attributes."""
81- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
81+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
8282 mock_traceloop_components ['create_resource' ].return_value = {
8383 'service.name' : 'test-app' ,
8484 'sap.telemetry.sdk.language' : 'python'
@@ -99,7 +99,7 @@ def test_auto_instrument_creates_resource_with_attributes(self, mock_traceloop_c
9999
100100 def test_auto_instrument_logs_initialization (self , mock_traceloop_components ):
101101 """Test that auto_instrument logs initialization messages."""
102- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
102+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
103103 mock_traceloop_components ['create_resource' ].return_value = {}
104104
105105 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317' }, clear = True ):
@@ -114,7 +114,7 @@ def test_auto_instrument_logs_initialization(self, mock_traceloop_components):
114114
115115 def test_auto_instrument_with_trailing_slash (self , mock_traceloop_components ):
116116 """Test that auto_instrument handles endpoint with trailing slash."""
117- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
117+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
118118 mock_traceloop_components ['create_resource' ].return_value = {}
119119
120120 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317/' }, clear = True ):
@@ -127,7 +127,7 @@ def test_auto_instrument_with_trailing_slash(self, mock_traceloop_components):
127127
128128 def test_auto_instrument_passes_transformer_to_traceloop (self , mock_traceloop_components ):
129129 """Test that auto_instrument passes the GenAIAttributeTransformer as exporter to Traceloop."""
130- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
130+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
131131 mock_traceloop_components ['create_resource' ].return_value = {}
132132 mock_transformer_instance = MagicMock ()
133133 mock_traceloop_components ['transformer' ].return_value = mock_transformer_instance
@@ -144,7 +144,7 @@ def test_auto_instrument_passes_transformer_to_traceloop(self, mock_traceloop_co
144144
145145 def test_auto_instrument_legacy_schema_parameter_ignored (self , mock_traceloop_components ):
146146 """Test that legacy_schema parameter is accepted but doesn't affect behavior."""
147- mock_traceloop_components ['get_conhos_app_name ' ].return_value = 'test-app'
147+ mock_traceloop_components ['get_app_name ' ].return_value = 'test-app'
148148 mock_traceloop_components ['create_resource' ].return_value = {}
149149
150150 with patch .dict ('os.environ' , {'OTEL_EXPORTER_OTLP_ENDPOINT' : 'http://localhost:4317' }, clear = True ):
0 commit comments