Skip to content

Commit a191a8a

Browse files
committed
fix reference
1 parent 633ad50 commit a191a8a

File tree

1 file changed

+2
-1
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-mcp/src/opentelemetry/instrumentation/mcp

1 file changed

+2
-1
lines changed

instrumentation-genai/opentelemetry-instrumentation-mcp/src/opentelemetry/instrumentation/mcp/session_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,14 @@ def extract_attributes(self, args: Tuple[Any, ...]) -> Tuple[Dict[str, str], Uni
251251

252252
# span name
253253
if method in ["tools/call", "prompts/get"]:
254-
target_name : str = message.request.root.params.name # type: ignore
254+
target_name = message.request.root.params.name # type: ignore
255255
span_name = f"{method} {target_name}"
256256
elif method in ["resources/read", "resources/subscribe", "resources/unsubscribe"]:
257257
target_name = str(message.request.root.params.uri) # type: ignore
258258
span_name = f"{method} {target_name}"
259259
else:
260260
span_name = method
261+
target_name = None
261262

262263
if target_name is not None and method in _method_names_with_target:
263264
(attr_name, _) = _method_names_with_target[method]

0 commit comments

Comments
 (0)