1010
1111from requests import Session
1212
13- from amazon .opentelemetry .distro ._aws_attribute_keys import AWS_AI_AGENT_TYPE , AWS_LOCAL_SERVICE
13+ from amazon .opentelemetry .distro ._aws_attribute_keys import AWS_LOCAL_SERVICE , AWS_SERVICE_TYPE
1414from amazon .opentelemetry .distro .always_record_sampler import AlwaysRecordSampler
1515from amazon .opentelemetry .distro .attribute_propagating_span_processor import AttributePropagatingSpanProcessor
1616from amazon .opentelemetry .distro .aws_batch_unsampled_span_processor import BatchUnsampledSpanProcessor
@@ -1106,7 +1106,7 @@ def test_customize_resource_without_agent_observability(self, mock_get_service_a
11061106
11071107 # Should only have AWS_LOCAL_SERVICE added
11081108 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1109- self .assertNotIn (AWS_AI_AGENT_TYPE , result .attributes )
1109+ self .assertNotIn (AWS_SERVICE_TYPE , result .attributes )
11101110
11111111 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
11121112 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.get_service_attribute" )
@@ -1120,9 +1120,9 @@ def test_customize_resource_with_agent_observability_default(
11201120 resource = Resource .create ({ResourceAttributes .SERVICE_NAME : "test-service" })
11211121 result = _customize_resource (resource )
11221122
1123- # Should have both AWS_LOCAL_SERVICE and AWS_AI_AGENT_TYPE with default value
1123+ # Should have both AWS_LOCAL_SERVICE and AWS_SERVICE_TYPE with default value
11241124 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1125- self .assertEqual (result .attributes [AWS_AI_AGENT_TYPE ], "default " )
1125+ self .assertEqual (result .attributes [AWS_SERVICE_TYPE ], "gen_ai_agent " )
11261126
11271127 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
11281128 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.get_service_attribute" )
@@ -1133,13 +1133,13 @@ def test_customize_resource_with_existing_agent_type(self, mock_get_service_attr
11331133
11341134 # Create resource with existing agent type
11351135 resource = Resource .create (
1136- {ResourceAttributes .SERVICE_NAME : "test-service" , AWS_AI_AGENT_TYPE : "existing-agent" }
1136+ {ResourceAttributes .SERVICE_NAME : "test-service" , AWS_SERVICE_TYPE : "existing-agent" }
11371137 )
11381138 result = _customize_resource (resource )
11391139
11401140 # Should preserve existing agent type and not override it
11411141 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1142- self .assertEqual (result .attributes [AWS_AI_AGENT_TYPE ], "existing-agent" )
1142+ self .assertEqual (result .attributes [AWS_SERVICE_TYPE ], "existing-agent" )
11431143
11441144
11451145def validate_distro_environ ():
0 commit comments