Skip to main content

Monitoring in DirectQuery

Tracing

DirectQuery leverages tracing to provides insights into the queries executed on the external database, such as the executed SQL query or the query id in the external database.

Check tracing to configure it.

Logging

Without tracing activated, DirectQuery provides some logging of the API and external queries.

Logger naming

To retrieve all the DirectQuery logs, the logger name should be "atoti.server.directquery".

As can be seen in the class, there are also some more granular loggers, to focus on one particular aspect of DirectQuery such as "atoti.server.directquery.incremental_refresh", ...

Here is the exhaustive list:

  • atoti.server.directquery
    • atoti.server.directquery.discovery
    • atoti.server.directquery.query_resolution
      • atoti.server.directquery.query_resolution.aggregate_table
      • atoti.server.directquery.query_resolution.time_travel
    • atoti.server.directquery.query_execution
    • atoti.server.directquery.query_handling

The logger names can be found in the com.activeviam.database.api.DatabaseLoggerConstants.class.

Logging Tags

SQL Queries are also augmented with tags in the logs, allowing to get more information about the query itself. In the log of a query, there is a map associating a tag with its value.

Here is a list of existing tags (note that only "category" will always be present)

  • "category": explains which type of queries it is; it could be for feeding a hierarchy, an aggregate provider, or a drillthrough query.
  • "pivot_name": the name of the pivot which originated the query.
  • "provider_name": the name of the aggregate provider, needing data.
  • "aggregate_table_name": the name of the aggregate table being queried.