mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-25 08:48:08 +02:00
fix: classify mcp query failures (#302)
This commit is contained in:
parent
8a50601582
commit
7e29543398
8 changed files with 102 additions and 8 deletions
|
|
@ -162,6 +162,7 @@
|
|||
"outcome",
|
||||
"durationMs",
|
||||
"errorClass",
|
||||
"errorDetail",
|
||||
"sampleRate",
|
||||
"mcpClientName",
|
||||
"mcpClientVersion"
|
||||
|
|
@ -1167,6 +1168,10 @@
|
|||
"errorClass": {
|
||||
"type": "string"
|
||||
},
|
||||
"errorDetail": {
|
||||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"sampleRate": {
|
||||
"type": "number",
|
||||
"const": 1
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ const mcpRequestCompletedSchema = telemetryCommonEnvelopeSchema
|
|||
outcome: outcomeSchema,
|
||||
durationMs: z.number().nonnegative(),
|
||||
errorClass: z.string().optional(),
|
||||
errorDetail: z.string().max(1000).optional(),
|
||||
sampleRate: z.literal(1),
|
||||
// Raw, client-tool-controlled identity from the MCP initialize handshake
|
||||
// (clientInfo.name/version). Optional: clients may omit clientInfo. Stored
|
||||
|
|
@ -349,7 +350,16 @@ export const telemetryEventCatalog = [
|
|||
{
|
||||
name: 'mcp_request_completed',
|
||||
description: 'Emitted for sampled MCP tool requests.',
|
||||
fields: ['toolName', 'outcome', 'durationMs', 'errorClass', 'sampleRate', 'mcpClientName', 'mcpClientVersion'],
|
||||
fields: [
|
||||
'toolName',
|
||||
'outcome',
|
||||
'durationMs',
|
||||
'errorClass',
|
||||
'errorDetail',
|
||||
'sampleRate',
|
||||
'mcpClientName',
|
||||
'mcpClientVersion',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'daemon_started',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue