From 2bd51e5295f9832f4ba5842787777538bd72140b Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 7 Oct 2022 19:09:09 +0200 Subject: [PATCH 01/10] Added startup option --query.log-failed-queries to optionally log all failed AQL queries to the server log. The option is turned off by default. --- 3.11/programs-arangod-query.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index 17525eb427..c5e4bc2eb4 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -130,6 +130,17 @@ 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 + +Introduced in: v3.11.0 + +`--query.log-failed-queries value` + +When set to *true*, will log all failed AQL queries 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. + ## Requiring `WITH` statements Introduced in: v3.7.12 From cee42102c228e748151cf387bf1751777b775841 Mon Sep 17 00:00:00 2001 From: Simran Date: Tue, 18 Oct 2022 10:54:38 +0200 Subject: [PATCH 02/10] Update programs-arangod-query.md --- 3.11/programs-arangod-query.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index c5e4bc2eb4..2b2e276fcf 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -136,9 +136,10 @@ The option can also be overridden for each individual AQL query. `--query.log-failed-queries value` -When set to *true*, will log all failed AQL queries to the server log. This +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. ## Requiring `WITH` statements From f9a85512f8cfcc17ef0ef12872a302792bd947b7 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 19 Oct 2022 10:43:18 +0200 Subject: [PATCH 03/10] updated after functionality change --- 3.11/programs-arangod-query.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index c5e4bc2eb4..16754088c2 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -134,13 +134,22 @@ The option can also be overridden for each individual AQL query. Introduced in: v3.11.0 -`--query.log-failed-queries value` +`--query.log-failed value` -When set to *true*, will log all failed AQL queries to the server log. This +When set to *true*, will log **all** failed AQL queries 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. +Introduced in: v3.11.0 + +`--query.max-artefact-log-length value` + +This option determins 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 logfiles. +The default value is **4096** bytes. + ## Requiring `WITH` statements Introduced in: v3.7.12 From 7dc5c10fcac262d6427dcbe3fe5dbcef75fd9c91 Mon Sep 17 00:00:00 2001 From: Simran Date: Wed, 19 Oct 2022 12:48:29 +0200 Subject: [PATCH 04/10] Formatting --- 3.11/programs-arangod-query.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index 205d72d3c5..e52aade02d 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -148,8 +148,9 @@ The option is turned off by default. This option determins 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 logfiles. -The default value is *4096* bytes. +to a reasonable length in logfiles. + +The default value is `4096` bytes. ## Requiring `WITH` statements From 9d5ce856cd8ef564517edd89b32b12fa9697abb7 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 19 Oct 2022 13:05:48 +0200 Subject: [PATCH 05/10] add new option --- 3.11/programs-arangod-query.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index e52aade02d..e25f338a52 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -142,11 +142,19 @@ in production. The option is turned off by default. +`--query.log-memory-usage-threshold value` + +This option determines the peak memory usage threshold for AQL queries from +which on a warning will be 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). + Introduced in: v3.11.0 `--query.max-artefact-log-length value` -This option determins the maximum length of logged query strings and bind parameter +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 logfiles. From d5ee9d3e81c1397915684dfae964766a31c7a05a Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 19 Oct 2022 13:07:29 +0200 Subject: [PATCH 06/10] fixed --- 3.11/programs-arangod-query.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index e25f338a52..7e5b1dd9ae 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -132,7 +132,7 @@ The option can also be overridden for each individual AQL query. ## Logging failed AQL queries -Introduced in: v3.11.0 +Introduced in: v3.9.5, v3.10.2, v3.11.0 `--query.log-failed value` @@ -142,15 +142,21 @@ in production. The option is turned off by default. +## Logging AQL queries with high memory usage + `--query.log-memory-usage-threshold value` +Introduced in: v3.9.5, v3.10.2, v3.11.0 + This option determines the peak memory usage threshold for AQL queries from which on a warning will be 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). -Introduced in: v3.11.0 +## Controlling length of logged query strings and bind parameter values + +Introduced in: v3.9.5, v3.10.2, v3.11.0 `--query.max-artefact-log-length value` From 2edcfd83697b1fa701eb90ae68a6e3645b751a9d Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 19 Oct 2022 13:09:00 +0200 Subject: [PATCH 07/10] adjusted for all relevant versions --- 3.10/programs-arangod-query.md | 36 ++++++++++++++++++++++++++++++++++ 3.9/programs-arangod-query.md | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/3.10/programs-arangod-query.md b/3.10/programs-arangod-query.md index 17525eb427..6abac7b5f5 100644 --- a/3.10/programs-arangod-query.md +++ b/3.10/programs-arangod-query.md @@ -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 + +Introduced in: v3.9.5, v3.10.2 + +`--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` + +Introduced in: v3.9.5, v3.10.2 + +This option determines the peak memory usage threshold for AQL queries from +which on a warning will be 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 + +Introduced in: v3.9.5, v3.10.2 + +`--query.max-artefact-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 logfiles. + +The default value is `4096` bytes. + ## Requiring `WITH` statements Introduced in: v3.7.12 diff --git a/3.9/programs-arangod-query.md b/3.9/programs-arangod-query.md index 88326f8a2e..a8007aab4e 100644 --- a/3.9/programs-arangod-query.md +++ b/3.9/programs-arangod-query.md @@ -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 + +Introduced in: v3.9.5 + +`--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` + +Introduced in: v3.9.5 + +This option determines the peak memory usage threshold for AQL queries from +which on a warning will be 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 + +Introduced in: v3.9.5 + +`--query.max-artefact-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 logfiles. + +The default value is `4096` bytes. + ## Requiring `WITH` statements Introduced in: v3.7.12 From aa4c0cd3d96e8511d1756347a87dca20e6f8dd83 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Thu, 20 Oct 2022 16:13:46 +0200 Subject: [PATCH 08/10] AE --- 3.10/programs-arangod-query.md | 2 +- 3.11/programs-arangod-query.md | 2 +- 3.9/programs-arangod-query.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3.10/programs-arangod-query.md b/3.10/programs-arangod-query.md index 6abac7b5f5..7ff6dc842e 100644 --- a/3.10/programs-arangod-query.md +++ b/3.10/programs-arangod-query.md @@ -158,7 +158,7 @@ The default value is `4294967296` (4 GB). Introduced in: v3.9.5, v3.10.2 -`--query.max-artefact-log-length value` +`--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 diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index 7e5b1dd9ae..89ea6f6b1e 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -158,7 +158,7 @@ The default value is `4294967296` (4 GB). Introduced in: v3.9.5, v3.10.2, v3.11.0 -`--query.max-artefact-log-length value` +`--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 diff --git a/3.9/programs-arangod-query.md b/3.9/programs-arangod-query.md index a8007aab4e..65155ce3a6 100644 --- a/3.9/programs-arangod-query.md +++ b/3.9/programs-arangod-query.md @@ -158,7 +158,7 @@ The default value is `4294967296` (4 GB). Introduced in: v3.9.5 -`--query.max-artefact-log-length value` +`--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 From fdf6bd337f1bd50ca0e6f4ece72909f107984034 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Wed, 2 Nov 2022 13:10:56 +0100 Subject: [PATCH 09/10] Review --- 3.10/programs-arangod-query.md | 4 ++-- 3.11/programs-arangod-query.md | 4 ++-- 3.9/programs-arangod-query.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/3.10/programs-arangod-query.md b/3.10/programs-arangod-query.md index 7ff6dc842e..af5a876d35 100644 --- a/3.10/programs-arangod-query.md +++ b/3.10/programs-arangod-query.md @@ -149,7 +149,7 @@ The option is turned off by default. Introduced in: v3.9.5, v3.10.2 This option determines the peak memory usage threshold for AQL queries from -which on a warning will be logged if queries exceed it. This is useful for +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). @@ -162,7 +162,7 @@ The default value is `4294967296` (4 GB). 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 logfiles. +to a reasonable length in log files. The default value is `4096` bytes. diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index 89ea6f6b1e..133b68f783 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -149,7 +149,7 @@ The option is turned off by default. Introduced in: v3.9.5, v3.10.2, v3.11.0 This option determines the peak memory usage threshold for AQL queries from -which on a warning will be logged if queries exceed it. This is useful for +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). @@ -162,7 +162,7 @@ The default value is `4294967296` (4 GB). 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 logfiles. +to a reasonable length in log files. The default value is `4096` bytes. diff --git a/3.9/programs-arangod-query.md b/3.9/programs-arangod-query.md index 65155ce3a6..9291020ebd 100644 --- a/3.9/programs-arangod-query.md +++ b/3.9/programs-arangod-query.md @@ -149,7 +149,7 @@ The option is turned off by default. Introduced in: v3.9.5 This option determines the peak memory usage threshold for AQL queries from -which on a warning will be logged if queries exceed it. This is useful for +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). @@ -162,7 +162,7 @@ The default value is `4294967296` (4 GB). 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 logfiles. +to a reasonable length in log files. The default value is `4096` bytes. From 5c32a3ddd355e0c1bd42e0216d3b12085532d69a Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Thu, 3 Nov 2022 09:36:06 +0100 Subject: [PATCH 10/10] Release notes --- 3.10/release-notes-new-features310.md | 13 +++++++++++++ 3.11/programs-arangod-query.md | 6 +++--- 3.9/release-notes-new-features39.md | 13 +++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/3.10/release-notes-new-features310.md b/3.10/release-notes-new-features310.md index 969c424e3e..db6e25a5d9 100644 --- a/3.10/release-notes-new-features310.md +++ b/3.10/release-notes-new-features310.md @@ -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 + +Introduced in: v3.9.5, v3.10.2 + +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) ---------------------------------------------------- diff --git a/3.11/programs-arangod-query.md b/3.11/programs-arangod-query.md index 133b68f783..af5a876d35 100644 --- a/3.11/programs-arangod-query.md +++ b/3.11/programs-arangod-query.md @@ -132,7 +132,7 @@ The option can also be overridden for each individual AQL query. ## Logging failed AQL queries -Introduced in: v3.9.5, v3.10.2, v3.11.0 +Introduced in: v3.9.5, v3.10.2 `--query.log-failed value` @@ -146,7 +146,7 @@ The option is turned off by default. `--query.log-memory-usage-threshold value` -Introduced in: v3.9.5, v3.10.2, v3.11.0 +Introduced in: v3.9.5, v3.10.2 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 @@ -156,7 +156,7 @@ The default value is `4294967296` (4 GB). ## Controlling length of logged query strings and bind parameter values -Introduced in: v3.9.5, v3.10.2, v3.11.0 +Introduced in: v3.9.5, v3.10.2 `--query.max-artifact-log-length value` diff --git a/3.9/release-notes-new-features39.md b/3.9/release-notes-new-features39.md index 26ed57bcf3..29a76376eb 100644 --- a/3.9/release-notes-new-features39.md +++ b/3.9/release-notes-new-features39.md @@ -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 + +Introduced in: v3.9.5 + +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 ----------------