Skip to content

Commit e7f6894

Browse files
authored
Change function trace group for MCP. (#1398)
1 parent 67a9f59 commit e7f6894

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

newrelic/hooks/adapter_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def wrap_call_tool(wrapped, instance, args, kwargs):
2929
func_name = callable_name(wrapped)
3030
function_trace_name = f"{func_name}/{tool_name}"
3131

32-
with FunctionTrace(name=function_trace_name, source=wrapped):
32+
with FunctionTrace(name=function_trace_name, group="Llm/tool/MCP", source=wrapped):
3333
return await wrapped(*args, **kwargs)
3434

3535

tests/adapter_mcp/test_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def add_exclamation(phrase):
3434

3535
@validate_transaction_metrics(
3636
"test_tools:test_tool_tracing",
37-
scoped_metrics=[("Function/mcp.client.session:ClientSession.call_tool/add_exclamation", 1)],
38-
rollup_metrics=[("Function/mcp.client.session:ClientSession.call_tool/add_exclamation", 1)],
37+
scoped_metrics=[("Llm/tool/MCP/mcp.client.session:ClientSession.call_tool/add_exclamation", 1)],
38+
rollup_metrics=[("Llm/tool/MCP/mcp.client.session:ClientSession.call_tool/add_exclamation", 1)],
3939
background_task=True,
4040
)
4141
@background_task()

0 commit comments

Comments
 (0)