Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
This feature is experimental.
Introduction
The Query History Starter automatically sets up query history persistence, a REST API, and security rules for tracking MDX query executions in an Atoti Server application. When enabled, it records MDX queries executed against the server, including their status, duration, user, and metadata. It also exposes REST endpoints to browse, filter, cancel, and delete recorded queries, as well as retrieve query execution plans. The following metadata attributes are automatically attached to queries:apiType— set torestfor queries executed via the REST API.failureCause— added automatically when a query fails, containing the error message.
Installation
To use the starter, add the following dependency to yourpom.xml.
Configuration
All properties live under theatoti.server.query-history namespace.
Enabling and disabling
The starter is enabled by default. To disable it:Database
Query history is persisted using Hibernate. Thedatabase property accepts standard Hibernate and HikariCP connection pool settings.
The following example configures an H2 in-memory database:
Field limits
Maximum character lengths for stored fields can be tuned. Values exceeding the limit are truncated.| Property | Default | Applies to |
|---|---|---|
field-limits.query | 10 000 | Query text |
field-limits.standard-field | 1 000 | Node name, trace ID, username, metadata attribute names |
field-limits.metadata-value | 10 000 | Metadata attribute values, error messages |
Security
The Atoti Server Starter registers aSecurityFilterChain (order 330) that protects all endpoints under /activeviam/query-history/rest/v1/**.
It uses the project’s MachineToMachineSecurityDsl with the following rules:
| Operation | Required authority |
|---|---|
OPTIONS | Permitted (CORS preflight) |
DELETE | Admin roles (configured via atoti.server.security.roles-admin) |
PATCH | Admin roles (configured via atoti.server.security.roles-admin) |
GET | Admin or user roles (combined roles-admin and roles-user) |
Distributed setup
In a distributed environment, the Query History Starter should be activated on the query node — the node that receives and executes client MDX queries. Activating it on a data node will have no effect since data nodes do not execute client MDX queries. Query cancellation is not supported in distributed environments. The cancel endpoints only operate on queries known to the local node.REST API
All endpoints are served under the base path/atoti/query-history/rest/v1.
See the Query History REST API for the full endpoint reference.