mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
Pass tool_name/prompt_name to client_span in proxy providers
Ensures proxied tool/prompt spans get gen_ai.tool.name and
gen_ai.prompt.name attributes, matching direct call spans.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ebba9f1aa9
commit
48c196a343
1 changed files with 8 additions and 2 deletions
|
|
@ -119,7 +119,10 @@ class ProxyTool(Tool):
|
|||
"""Executes the tool by making a call through the client."""
|
||||
backend_name = self._backend_name or self.name
|
||||
with client_span(
|
||||
f"tools/call {backend_name}", "tools/call", backend_name
|
||||
f"tools/call {backend_name}",
|
||||
"tools/call",
|
||||
backend_name,
|
||||
tool_name=backend_name,
|
||||
) as span:
|
||||
span.set_attribute("fastmcp.provider.type", "ProxyProvider")
|
||||
client = await self._get_client()
|
||||
|
|
@ -450,7 +453,10 @@ class ProxyPrompt(Prompt):
|
|||
"""Render the prompt by making a call through the client."""
|
||||
backend_name = self._backend_name or self.name
|
||||
with client_span(
|
||||
f"prompts/get {backend_name}", "prompts/get", backend_name
|
||||
f"prompts/get {backend_name}",
|
||||
"prompts/get",
|
||||
backend_name,
|
||||
prompt_name=backend_name,
|
||||
) as span:
|
||||
span.set_attribute("fastmcp.provider.type", "ProxyProvider")
|
||||
client = await self._get_client()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue