Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Added startup option --query.log-failed-queries to optionally log all… #1140

Merged
merged 16 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions 3.10/programs-arangod-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,42 @@ queries early. When set to *false*, AQL queries that produce warnings will not
abort and return the warnings along with the query results.
The option can also be overridden for each individual AQL query.

## Logging failed AQL queries

<small>Introduced in: v3.9.5, v3.10.2</small>

`--query.log-failed value`

If set to `true`, all failed AQL queries are logged to the server log. This
option can be used during development, or to catch unexpected failed queries
in production.

The option is turned off by default.

## Logging AQL queries with high memory usage

`--query.log-memory-usage-threshold value`

<small>Introduced in: v3.9.5, v3.10.2</small>

This option determines the peak memory usage threshold for AQL queries from
which on a warning is logged if queries exceed it. This is useful for
finding queries that use a large amount of memory.

The default value is `4294967296` (4 GB).

## Controlling length of logged query strings and bind parameter values

<small>Introduced in: v3.9.5, v3.10.2</small>

`--query.max-artifact-log-length value`

This option determines the maximum length of logged query strings and bind parameter
values. This allows truncating overly long query strings and bind parameter values
to a reasonable length in log files.

The default value is `4096` bytes.

## Requiring `WITH` statements

<small>Introduced in: v3.7.12</small>
Expand Down
13 changes: 13 additions & 0 deletions 3.10/release-notes-new-features310.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,19 @@ temporary data:

For more information on the new options, please refer to [ArangoDB Server Pregel Options](programs-arangod-pregel.html).

### AQL query logging

<small>Introduced in: v3.9.5, v3.10.2</small>

There are three new startup options to configure how AQL queries are logged:

- `--query.log-failed` for logging all failed AQL queries, to be used during
development or to catch unexpected failed queries in production (off by default)
- `--query.log-memory-usage-threshold` to define a peak memory threshold from
which on a warning is logged for AQL queries that exceed it (default: 4 GB)
- `--query.max-artifact-log-length` for controlling the length of logged query
strings and bind parameter values. Both are truncated to 4096 bytes by default.

Read from Followers in Clusters (Enterprise Edition)
----------------------------------------------------

Expand Down
36 changes: 36 additions & 0 deletions 3.11/programs-arangod-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,42 @@ queries early. When set to *false*, AQL queries that produce warnings will not
abort and return the warnings along with the query results.
The option can also be overridden for each individual AQL query.

## Logging failed AQL queries

<small>Introduced in: v3.9.5, v3.10.2</small>

`--query.log-failed value`

If set to `true`, all failed AQL queries are logged to the server log. This
option can be used during development, or to catch unexpected failed queries
in production.

The option is turned off by default.

## Logging AQL queries with high memory usage

`--query.log-memory-usage-threshold value`

<small>Introduced in: v3.9.5, v3.10.2</small>

This option determines the peak memory usage threshold for AQL queries from
which on a warning is logged if queries exceed it. This is useful for
finding queries that use a large amount of memory.

The default value is `4294967296` (4 GB).

## Controlling length of logged query strings and bind parameter values

<small>Introduced in: v3.9.5, v3.10.2</small>

`--query.max-artifact-log-length value`

This option determines the maximum length of logged query strings and bind parameter
values. This allows truncating overly long query strings and bind parameter values
to a reasonable length in log files.

The default value is `4096` bytes.

## Requiring `WITH` statements

<small>Introduced in: v3.7.12</small>
Expand Down
36 changes: 36 additions & 0 deletions 3.9/programs-arangod-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,42 @@ queries early. When set to *false*, AQL queries that produce warnings will not
abort and return the warnings along with the query results.
The option can also be overridden for each individual AQL query.

## Logging failed AQL queries

<small>Introduced in: v3.9.5</small>

`--query.log-failed value`

If set to `true`, all failed AQL queries are logged to the server log. This
option can be used during development, or to catch unexpected failed queries
in production.

The option is turned off by default.

## Logging AQL queries with high memory usage

`--query.log-memory-usage-threshold value`

<small>Introduced in: v3.9.5</small>

This option determines the peak memory usage threshold for AQL queries from
which on a warning is logged if queries exceed it. This is useful for
finding queries that use a large amount of memory.

The default value is `4294967296` (4 GB).

## Controlling length of logged query strings and bind parameter values

<small>Introduced in: v3.9.5</small>

`--query.max-artifact-log-length value`

This option determines the maximum length of logged query strings and bind parameter
values. This allows truncating overly long query strings and bind parameter values
to a reasonable length in log files.

The default value is `4096` bytes.

## Requiring `WITH` statements

<small>Introduced in: v3.7.12</small>
Expand Down
13 changes: 13 additions & 0 deletions 3.9/release-notes-new-features39.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,19 @@ A pseudo log topic `"all"` was added. Setting the log level for the "all" log
topic will adjust the log level for **all existing log topics**. For example,
`--log.level all=debug` will set all log topics to log level "debug".

### AQL query logging

<small>Introduced in: v3.9.5</small>

There are three new startup options to configure how AQL queries are logged:

- `--query.log-failed` for logging all failed AQL queries, to be used during
development or to catch unexpected failed queries in production (off by default)
- `--query.log-memory-usage-threshold` to define a peak memory threshold from
which on a warning is logged for AQL queries that exceed it (default: 4 GB)
- `--query.max-artifact-log-length` for controlling the length of logged query
strings and bind parameter values. Both are truncated to 4096 bytes by default.

Overload control
----------------

Expand Down