Add the duoToolCalls analytics data source

What does this MR do?

Adds a new analytics data source for Duo Chat tool call events. Select it with type = duotoolcall. It compiles to analytics { duoToolCalls { aggregated ... } }.

query: type = duotoolcall and timestamp > "2026-10-01"
dimensions: toolName, toolAccess
metrics: totalCount, successRate

Dimensions: toolName, outcome, toolAccess, flowType, user, group (with a depth parameter), timestamp (date bucket, weekly by default).

Metrics: totalCount, usersCount, sessionsCount, writeSessionsCount, readOnlySessionsCount, successRate.

Filters:

  • toolName and flowType: =, !=, in, not in.
  • outcome: = and in. It is a closed enum (succeeded, failed). There is no negation, because with two values it is redundant.
  • toolAccess: closed enum (read, write). Can be negated.
  • user: numeric ID. Can be negated.
  • timestamp: range.

The two enums are closed on the GLQL side. The engine matches plain strings, so a typo would return zero rows with no error. Enum tokens are lower-cased before they reach the engine.

Changes

  • New src/analyzer/sources/duo_tool_calls.rs.
  • Field variants in src/types/field.rs.
  • Source registered in src/types/source.rs, src/analyzer/sources/mod.rs and the type enum list in shared.rs.
  • Regenerated src/schema/schema.json.
  • New tests/duo_tool_calls_tests.rs, plus updates to the negation matrix and type tests fixtures.
  • Related to gitlab#633445 (closed)
  • Depends on gitlab!263296 (merged), which adds the duoToolCalls engine to the Analytics GraphQL type.
  • Until that MR merges, the graphql-validate job fails because it validates against the master schema. This MR stays Draft until then.

Follow-up

The monolith gem bump and the docs page doc/user/glql/data_sources/duo_tool_calls.md come in a separate monolith MR after this is released.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Merge request reports

Loading
Loading