Make tool payload tracing config key more verbose

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2026-05-18 16:50:14 +02:00
parent b70f13990b
commit 3914351b84
3 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -326,13 +326,13 @@ This flag is honored by every plugin that creates spans through the [Tracing Ser
### Capturing tool arguments and results
When `backend.tracing.capture.toolPayloads` is enabled, the tool's input arguments and output result are recorded on the span as `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`.
When `backend.tracing.capture.mcpActionsToolPayloads` is enabled, the tool's input arguments and output result are recorded on the span as `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`.
```yaml title="app-config.yaml"
backend:
tracing:
capture:
toolPayloads: true # defaults to false
mcpActionsToolPayloads: true # defaults to false
```
:::warning
+3 -3
View File
@@ -19,15 +19,15 @@ export interface Config {
tracing?: {
capture?: {
/**
* When true, the tool call's input arguments and output result are
* included on the MCP `tools/call` server span as
* When true, the MCP 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;
mcpActionsToolPayloads?: boolean;
};
};
};
+3 -2
View File
@@ -68,8 +68,9 @@ export const mcpPlugin = createBackendPlugin({
'mcpActions.namespacedToolNames',
);
const captureToolPayloads =
config.getOptionalBoolean('backend.tracing.capture.toolPayloads') ??
false;
config.getOptionalBoolean(
'backend.tracing.capture.mcpActionsToolPayloads',
) ?? false;
const mcpService = await McpService.create({
actions,