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 39
39
GEN_AI_CLIENT_OPERATION_DURATION ,
40
40
GEN_AI_CLIENT_TOKEN_USAGE ,
41
41
)
42
+ from opentelemetry .semconv .trace import SpanAttributes
42
43
43
44
44
45
# pylint: disable=too-many-branches, too-many-locals, too-many-statements
@@ -221,6 +222,8 @@ def assert_all_attributes(
221
222
request_temperature : int | None = None ,
222
223
request_max_tokens : int | None = None ,
223
224
request_stop_sequences : tuple [str ] | None = None ,
225
+ server_address : str = "bedrock-runtime.us-east-1.amazonaws.com" ,
226
+ server_port : int = 443 ,
224
227
):
225
228
assert span .name == f"{ operation_name } { request_model } "
226
229
assert (
@@ -235,6 +238,9 @@ def assert_all_attributes(
235
238
request_model == span .attributes [GenAIAttributes .GEN_AI_REQUEST_MODEL ]
236
239
)
237
240
241
+ assert server_address == span .attributes [SpanAttributes .SERVER_ADDRESS ]
242
+ assert server_port == span .attributes [SpanAttributes .SERVER_PORT ]
243
+
238
244
assert_equal_or_not_present (
239
245
input_tokens , GenAIAttributes .GEN_AI_USAGE_INPUT_TOKENS , span
240
246
)
You can’t perform that action at this time.
0 commit comments