Skip to content
Open
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
20 changes: 20 additions & 0 deletions javascript/sentry-conventions/src/op.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,26 @@ export const GENERAL_FUNCTION_SPAN_OP = 'function';
*/
export const GENERAL_MEASURE_SPAN_OP = 'measure';

// Path: model/op/mcp.json
// Name: mcp

// Description: Operations related to Model Context Protocol (MCP) interactions

/**
* A request handled by an MCP server (e.g. a tool call, resource read, or prompt request).
*/
export const MCP_MCP_SERVER_SPAN_OP = 'mcp.server';

/**
* A notification sent from an MCP client to an MCP server.
*/
export const MCP_MCP_NOTIFICATION_CLIENT_TO_SERVER_SPAN_OP = 'mcp.notification.client_to_server';

/**
* A notification sent from an MCP server to an MCP client.
*/
export const MCP_MCP_NOTIFICATION_SERVER_TO_CLIENT_SPAN_OP = 'mcp.notification.server_to_client';

// Path: model/op/messaging.json
// Name: messaging

Expand Down
29 changes: 29 additions & 0 deletions model/description/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"brief": "Model Context Protocol (MCP)",
"operations": [
{
"name": "Server",
"brief": "MCP server-side operations. Processing of incoming MCP requests initiated by a client, such as tool calls, prompt requests, and resource reads.",
"ops": ["mcp.server"],
"templates": [
"{{mcp.method.name}} {{gen_ai.tool.name}}",
"{{mcp.method.name}} {{gen_ai.prompt.name}}",
"{{mcp.method.name}} {{mcp.resource.uri}}",
"{{mcp.method.name}}"
],
"examples": [
"tools/call get-weather",
"prompts/get analyze-code",
"resources/read postgres://database/customers/schema",
"initialize"
]
},
{
"name": "Notification",
"brief": "MCP notifications. One-way messages exchanged between an MCP client and server that do not expect a response.",
"ops": ["mcp.notification.client_to_server", "mcp.notification.server_to_client"],
"templates": ["{{mcp.method.name}}"],
"examples": ["notifications/initialized", "notifications/cancelled", "notifications/progress"]
}
]
}
9 changes: 9 additions & 0 deletions model/name/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
"MCP server operation"
],
"examples": ["tools/call get-weather", "prompts/get analyze-code", "resources/read", "initialize"]
},
{
"name": "Notification",
"brief": "MCP notifications. One-way messages exchanged between an MCP client and server that do not expect a response.",
"is_in_otel": true,
"otel_notes": "OpenTelemetry does not model notifications as distinct operations; they are covered by the MCP Client and Server spans.",
"ops": ["mcp.notification.client_to_server", "mcp.notification.server_to_client"],
"templates": ["{{mcp.method.name}}", "MCP notification"],
"examples": ["notifications/initialized", "notifications/cancelled", "notifications/progress"]
}
]
}
18 changes: 18 additions & 0 deletions model/op/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "mcp",
"description": "Operations related to Model Context Protocol (MCP) interactions",
"fields": [
{
"name": "mcp.server",
"description": "A request handled by an MCP server (e.g. a tool call, resource read, or prompt request)."
},
{
"name": "mcp.notification.client_to_server",
"description": "A notification sent from an MCP client to an MCP server."
},
{
"name": "mcp.notification.server_to_client",
"description": "A notification sent from an MCP server to an MCP client."
}
]
}
13 changes: 13 additions & 0 deletions rust/src/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,19 @@ pub const GENERAL_FUNCTION_SPAN_OP: &str = "function";
/// A user-defined measurement of the duration between two points in time
pub const GENERAL_MEASURE_SPAN_OP: &str = "measure";

// Path: model/op/mcp.json
// Name: mcp

// Description: Operations related to Model Context Protocol (MCP) interactions
/// A request handled by an MCP server (e.g. a tool call, resource read, or prompt request).
pub const MCP_MCP_SERVER_SPAN_OP: &str = "mcp.server";

/// A notification sent from an MCP client to an MCP server.
pub const MCP_MCP_NOTIFICATION_CLIENT_TO_SERVER_SPAN_OP: &str = "mcp.notification.client_to_server";

/// A notification sent from an MCP server to an MCP client.
pub const MCP_MCP_NOTIFICATION_SERVER_TO_CLIENT_SPAN_OP: &str = "mcp.notification.server_to_client";

// Path: model/op/messaging.json
// Name: messaging

Expand Down
Loading