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
@@ -1100,7 +1100,7 @@ def test_customize_resource_without_agent_observability(self, mock_get_service_a
11001100
11011101 # Should only have AWS_LOCAL_SERVICE added
11021102 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1103- self .assertNotIn (AWS_AI_AGENT_TYPE , result .attributes )
1103+ self .assertNotIn (AWS_SERVICE_TYPE , result .attributes )
11041104
11051105 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
11061106 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.get_service_attribute" )
@@ -1114,9 +1114,9 @@ def test_customize_resource_with_agent_observability_default(
11141114 resource = Resource .create ({ResourceAttributes .SERVICE_NAME : "test-service" })
11151115 result = _customize_resource (resource )
11161116
1117- # Should have both AWS_LOCAL_SERVICE and AWS_AI_AGENT_TYPE with default value
1117+ # Should have both AWS_LOCAL_SERVICE and AWS_SERVICE_TYPE with default value
11181118 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1119- self .assertEqual (result .attributes [AWS_AI_AGENT_TYPE ], "default " )
1119+ self .assertEqual (result .attributes [AWS_SERVICE_TYPE ], "gen_ai_agent " )
11201120
11211121 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
11221122 @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.get_service_attribute" )
@@ -1127,13 +1127,13 @@ def test_customize_resource_with_existing_agent_type(self, mock_get_service_attr
11271127
11281128 # Create resource with existing agent type
11291129 resource = Resource .create (
1130- {ResourceAttributes .SERVICE_NAME : "test-service" , AWS_AI_AGENT_TYPE : "existing-agent" }
1130+ {ResourceAttributes .SERVICE_NAME : "test-service" , AWS_SERVICE_TYPE : "existing-agent" }
11311131 )
11321132 result = _customize_resource (resource )
11331133
11341134 # Should preserve existing agent type and not override it
11351135 self .assertEqual (result .attributes [AWS_LOCAL_SERVICE ], "test-service" )
1136- self .assertEqual (result .attributes [AWS_AI_AGENT_TYPE ], "existing-agent" )
1136+ self .assertEqual (result .attributes [AWS_SERVICE_TYPE ], "existing-agent" )
11371137
11381138
11391139def validate_distro_environ ():
0 commit comments