Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sentry_sdk/integrations/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,6 @@ async def _instrument_tool_call(
SPANDATA.GEN_AI_TOOL_CALL_RESULT,
safe_serialize(result_content),
)
# Set content count if result is a dict
if isinstance(result_content, dict):
span.set_attribute(
SPANDATA.MCP_TOOL_RESULT_CONTENT_COUNT,
len(result_content),
)

return result

Expand Down
4 changes: 0 additions & 4 deletions tests/integrations/mcp/test_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ async def test_tool(ctx, params):
"value": 42,
}
)
assert data[SPANDATA.MCP_TOOL_RESULT_CONTENT_COUNT] == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -389,7 +388,6 @@ async def test_tool(ctx, params):
assert SPANDATA.MCP_SESSION_ID not in data

assert SPANDATA.GEN_AI_TOOL_CALL_RESULT not in data
assert SPANDATA.MCP_TOOL_RESULT_CONTENT_COUNT not in data


@pytest.mark.asyncio
Expand Down Expand Up @@ -1183,7 +1181,6 @@ async def test_tool_tuple(ctx, params):
"count": 5,
}
)
assert data[SPANDATA.MCP_TOOL_RESULT_CONTENT_COUNT] == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -1231,7 +1228,6 @@ async def test_tool_tuple(ctx, params):
data = span["attributes"]

assert SPANDATA.GEN_AI_TOOL_CALL_RESULT not in data
assert SPANDATA.MCP_TOOL_RESULT_CONTENT_COUNT not in data


@pytest.mark.asyncio
Expand Down
Loading