File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
instrumentation/opentelemetry-instrumentation-botocore/tests Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 3939 GEN_AI_CLIENT_OPERATION_DURATION ,
4040 GEN_AI_CLIENT_TOKEN_USAGE ,
4141)
42+ from opentelemetry .semconv .trace import SpanAttributes
4243
4344
4445# pylint: disable=too-many-branches, too-many-locals, too-many-statements
@@ -221,6 +222,8 @@ def assert_all_attributes(
221222 request_temperature : int | None = None ,
222223 request_max_tokens : int | None = None ,
223224 request_stop_sequences : tuple [str ] | None = None ,
225+ server_address : str = "bedrock-runtime.us-east-1.amazonaws.com" ,
226+ server_port : int = 443 ,
224227):
225228 assert span .name == f"{ operation_name } { request_model } "
226229 assert (
@@ -235,6 +238,9 @@ def assert_all_attributes(
235238 request_model == span .attributes [GenAIAttributes .GEN_AI_REQUEST_MODEL ]
236239 )
237240
241+ assert server_address == span .attributes [SpanAttributes .SERVER_ADDRESS ]
242+ assert server_port == span .attributes [SpanAttributes .SERVER_PORT ]
243+
238244 assert_equal_or_not_present (
239245 input_tokens , GenAIAttributes .GEN_AI_USAGE_INPUT_TOKENS , span
240246 )
You can’t perform that action at this time.
0 commit comments