Instrument MCP tool calls with semantically appropriate span

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2026-04-28 17:55:32 +02:00
parent eab8f7a510
commit 8916f83bee
7 changed files with 346 additions and 38 deletions
+17
View File
@@ -15,6 +15,23 @@
*/
export interface Config {
backend?: {
tracing?: {
capture?: {
/**
* When true, the tool call's input arguments and output result are
* included on the MCP `tools/call` server span as
* `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`.
* These attributes are marked Opt-In by the OpenTelemetry GenAI
* semantic conventions because they may contain sensitive
* information (entity payloads, scaffolder inputs, free-form
* text). Defaults to false.
*/
toolPayloads?: boolean;
};
};
};
mcpActions?: {
/**
* Display name for the MCP server. Defaults to "backstage".