Skip to content

Commit d5f0ac3

Browse files
authored
ref(core): Adjust MCP server error event mechanism (#17622)
This PR adjusts the mechanism type we set to be in line with the trace origin naming scheme. ref #17212
1 parent 9914924 commit d5f0ac3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/core/src/integrations/mcp-server/errorCapture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function captureError(error: Error, errorType?: McpErrorType, extraData?:
3636

3737
captureException(error, {
3838
mechanism: {
39-
type: 'mcp_server',
39+
type: 'auto.ai.mcp_server',
4040
handled: false,
4141
data: {
4242
error_type: errorType || 'handler_execution',

packages/core/test/lib/integrations/mcp-server/mcpServerErrorCapture.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('MCP Server Error Capture', () => {
2424

2525
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
2626
mechanism: {
27-
type: 'mcp_server',
27+
type: 'auto.ai.mcp_server',
2828
handled: false,
2929
data: {
3030
error_type: 'tool_execution',
@@ -40,7 +40,7 @@ describe('MCP Server Error Capture', () => {
4040

4141
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
4242
mechanism: {
43-
type: 'mcp_server',
43+
type: 'auto.ai.mcp_server',
4444
handled: false,
4545
data: {
4646
error_type: 'transport',
@@ -56,7 +56,7 @@ describe('MCP Server Error Capture', () => {
5656

5757
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
5858
mechanism: {
59-
type: 'mcp_server',
59+
type: 'auto.ai.mcp_server',
6060
handled: false,
6161
data: {
6262
error_type: 'protocol',
@@ -72,7 +72,7 @@ describe('MCP Server Error Capture', () => {
7272

7373
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
7474
mechanism: {
75-
type: 'mcp_server',
75+
type: 'auto.ai.mcp_server',
7676
handled: false,
7777
data: {
7878
error_type: 'validation',
@@ -88,7 +88,7 @@ describe('MCP Server Error Capture', () => {
8888

8989
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
9090
mechanism: {
91-
type: 'mcp_server',
91+
type: 'auto.ai.mcp_server',
9292
handled: false,
9393
data: {
9494
error_type: 'timeout',
@@ -104,7 +104,7 @@ describe('MCP Server Error Capture', () => {
104104

105105
expect(captureExceptionSpy).toHaveBeenCalledWith(error, {
106106
mechanism: {
107-
type: 'mcp_server',
107+
type: 'auto.ai.mcp_server',
108108
handled: false,
109109
data: {
110110
error_type: 'tool_execution',

0 commit comments

Comments
 (0)