10
10
11
11
from requests import Session
12
12
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
14
14
from amazon .opentelemetry .distro .always_record_sampler import AlwaysRecordSampler
15
15
from amazon .opentelemetry .distro .attribute_propagating_span_processor import AttributePropagatingSpanProcessor
16
16
from 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
1106
1106
1107
1107
# Should only have AWS_LOCAL_SERVICE added
1108
1108
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 )
1110
1110
1111
1111
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
1112
1112
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.get_service_attribute" )
@@ -1120,9 +1120,9 @@ def test_customize_resource_with_agent_observability_default(
1120
1120
resource = Resource .create ({ResourceAttributes .SERVICE_NAME : "test-service" })
1121
1121
result = _customize_resource (resource )
1122
1122
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
1124
1124
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 " )
1126
1126
1127
1127
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.is_agent_observability_enabled" )
1128
1128
@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
1133
1133
1134
1134
# Create resource with existing agent type
1135
1135
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" }
1137
1137
)
1138
1138
result = _customize_resource (resource )
1139
1139
1140
1140
# Should preserve existing agent type and not override it
1141
1141
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" )
1143
1143
1144
1144
1145
1145
def validate_distro_environ ():
0 commit comments