From bbdb1a1ca56463ba3da09a3551b8f5defac110ed Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Fri, 4 Jul 2025 15:28:42 +0200 Subject: [PATCH 1/3] Fix API call recording OpenAPI description and release notes --- .../3.12/develop/http-api/monitoring/logs.md | 77 +++++++++++++++++-- .../version-3.12/whats-new-in-3-12.md | 15 ++-- 2 files changed, 79 insertions(+), 13 deletions(-) diff --git a/site/content/3.12/develop/http-api/monitoring/logs.md b/site/content/3.12/develop/http-api/monitoring/logs.md index 64bef4afa0..3bd53c5dfe 100644 --- a/site/content/3.12/develop/http-api/monitoring/logs.md +++ b/site/content/3.12/develop/http-api/monitoring/logs.md @@ -848,14 +848,17 @@ paths: operationId: getRecentApiCalls description: | Get a list of the most recent requests with a timestamp and the endpoint. - This feature is for debugging purposes. + This feature is for debugging purposes. You can control how much memory is used to record API calls with the - `--server.memory-per-api-call-list` and `--server.number-of-api-call-lists` - startup options. + `--server.api-recording-memory-limit` startup option. - You can disable API call recording via the `--server.api-call-recording` - startup option. The endpoint returns an empty list of calls in this case. + You can disable this endpoint + with the `--log.recording-api-enabled` startup option. + + Whether API calls are recorded is independently controlled by the + `--server.api-call-recording` startup option. + The endpoint returns an empty list of calls if turned off. parameters: - name: database-name in: path @@ -870,7 +873,7 @@ paths: responses: '200': description: | - The + Returns the recorded API calls. content: application/json: schema: @@ -953,6 +956,68 @@ paths: description: | A descriptive error message. type: string + '403': + description: | + The recording API has been disabled. + content: + application/json: + schema: + type: object + required: + - error + - code + - errorNum + - errorMessage + properties: + error: + description: | + A flag indicating that an error occurred. + type: boolean + example: true + code: + description: | + The HTTP response status code. + type: integer + example: 403 + errorNum: + description: | + ArangoDB error number for the error that occurred. + type: integer + errorMessage: + description: | + A descriptive error message. + type: string + '501': + description: | + The method has not been called on a Coordinator or single server. + content: + application/json: + schema: + type: object + required: + - error + - code + - errorNum + - errorMessage + properties: + error: + description: | + A flag indicating that an error occurred. + type: boolean + example: true + code: + description: | + The HTTP response status code. + type: integer + example: 501 + errorNum: + description: | + ArangoDB error number for the error that occurred. + type: integer + errorMessage: + description: | + A descriptive error message. + type: string tags: - Monitoring ``` diff --git a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md index 77b8c26bb2..e89f9790c8 100644 --- a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md @@ -2167,19 +2167,20 @@ A new `/_admin/server/api-calls` endpoint has been added to let you retrieve a list of the most recent requests with a timestamp and the endpoint. This feature is for debugging purposes. -You can configure the memory limit for this feature with the following startup options: +You can configure the memory limit for this feature with the following startup option: -- `--server.number-of-api-call-lists`: - The size of the ring buffer for API call record lists (default: `256`). -- `--server.memory-per-api-call-list`: - The amount of memory used for a single API call record list (default: `100000` bytes) - -This means that approximately 25 MB of memory are reserved by default. +- `--server.api-recording-memory-limit`: + Size limit for the list of API call records (default: `25600000`). +This means that 25 MB of memory is reserved by default. API call recording is enabled by default but you can disable it via the new `--server.api-call-recording` startup option. +The `/_admin/server/api-calls` endpoint exposes the recorded API calls. +It is enabled by default. You can disable it altogether by setting the new +`--log.recording-api-enabled` startup option to `false`. + A metric has been added for the time spent on API call recording to track the impact of this feature: From 0f80f4c2c819f197c60bfe86c8fddf467d347d4e Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Fri, 4 Jul 2025 15:30:04 +0200 Subject: [PATCH 2/3] Apply to 3.13 --- .../3.13/develop/http-api/monitoring/logs.md | 77 +++++++++++++++++-- .../version-3.12/whats-new-in-3-12.md | 15 ++-- 2 files changed, 79 insertions(+), 13 deletions(-) diff --git a/site/content/3.13/develop/http-api/monitoring/logs.md b/site/content/3.13/develop/http-api/monitoring/logs.md index 64bef4afa0..3bd53c5dfe 100644 --- a/site/content/3.13/develop/http-api/monitoring/logs.md +++ b/site/content/3.13/develop/http-api/monitoring/logs.md @@ -848,14 +848,17 @@ paths: operationId: getRecentApiCalls description: | Get a list of the most recent requests with a timestamp and the endpoint. - This feature is for debugging purposes. + This feature is for debugging purposes. You can control how much memory is used to record API calls with the - `--server.memory-per-api-call-list` and `--server.number-of-api-call-lists` - startup options. + `--server.api-recording-memory-limit` startup option. - You can disable API call recording via the `--server.api-call-recording` - startup option. The endpoint returns an empty list of calls in this case. + You can disable this endpoint + with the `--log.recording-api-enabled` startup option. + + Whether API calls are recorded is independently controlled by the + `--server.api-call-recording` startup option. + The endpoint returns an empty list of calls if turned off. parameters: - name: database-name in: path @@ -870,7 +873,7 @@ paths: responses: '200': description: | - The + Returns the recorded API calls. content: application/json: schema: @@ -953,6 +956,68 @@ paths: description: | A descriptive error message. type: string + '403': + description: | + The recording API has been disabled. + content: + application/json: + schema: + type: object + required: + - error + - code + - errorNum + - errorMessage + properties: + error: + description: | + A flag indicating that an error occurred. + type: boolean + example: true + code: + description: | + The HTTP response status code. + type: integer + example: 403 + errorNum: + description: | + ArangoDB error number for the error that occurred. + type: integer + errorMessage: + description: | + A descriptive error message. + type: string + '501': + description: | + The method has not been called on a Coordinator or single server. + content: + application/json: + schema: + type: object + required: + - error + - code + - errorNum + - errorMessage + properties: + error: + description: | + A flag indicating that an error occurred. + type: boolean + example: true + code: + description: | + The HTTP response status code. + type: integer + example: 501 + errorNum: + description: | + ArangoDB error number for the error that occurred. + type: integer + errorMessage: + description: | + A descriptive error message. + type: string tags: - Monitoring ``` diff --git a/site/content/3.13/release-notes/version-3.12/whats-new-in-3-12.md b/site/content/3.13/release-notes/version-3.12/whats-new-in-3-12.md index 77b8c26bb2..e89f9790c8 100644 --- a/site/content/3.13/release-notes/version-3.12/whats-new-in-3-12.md +++ b/site/content/3.13/release-notes/version-3.12/whats-new-in-3-12.md @@ -2167,19 +2167,20 @@ A new `/_admin/server/api-calls` endpoint has been added to let you retrieve a list of the most recent requests with a timestamp and the endpoint. This feature is for debugging purposes. -You can configure the memory limit for this feature with the following startup options: +You can configure the memory limit for this feature with the following startup option: -- `--server.number-of-api-call-lists`: - The size of the ring buffer for API call record lists (default: `256`). -- `--server.memory-per-api-call-list`: - The amount of memory used for a single API call record list (default: `100000` bytes) - -This means that approximately 25 MB of memory are reserved by default. +- `--server.api-recording-memory-limit`: + Size limit for the list of API call records (default: `25600000`). +This means that 25 MB of memory is reserved by default. API call recording is enabled by default but you can disable it via the new `--server.api-call-recording` startup option. +The `/_admin/server/api-calls` endpoint exposes the recorded API calls. +It is enabled by default. You can disable it altogether by setting the new +`--log.recording-api-enabled` startup option to `false`. + A metric has been added for the time spent on API call recording to track the impact of this feature: From a77afc91b1cdcec1fe70e311d629b3a7c7434658 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Fri, 4 Jul 2025 15:38:24 +0200 Subject: [PATCH 3/3] Upper-case requestType in responses --- site/content/3.12/develop/http-api/monitoring/logs.md | 2 +- site/content/3.13/develop/http-api/monitoring/logs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/3.12/develop/http-api/monitoring/logs.md b/site/content/3.12/develop/http-api/monitoring/logs.md index 3bd53c5dfe..f07f8a1109 100644 --- a/site/content/3.12/develop/http-api/monitoring/logs.md +++ b/site/content/3.12/develop/http-api/monitoring/logs.md @@ -916,7 +916,7 @@ paths: description: | The HTTP request method. type: string - enum: [get, patch, put, delete, head] + enum: [GET, PATCH, PUT, DELETE, HEAD] path: description: | The HTTP request path excluding the database prefix (`/_db/`). diff --git a/site/content/3.13/develop/http-api/monitoring/logs.md b/site/content/3.13/develop/http-api/monitoring/logs.md index 3bd53c5dfe..f07f8a1109 100644 --- a/site/content/3.13/develop/http-api/monitoring/logs.md +++ b/site/content/3.13/develop/http-api/monitoring/logs.md @@ -916,7 +916,7 @@ paths: description: | The HTTP request method. type: string - enum: [get, patch, put, delete, head] + enum: [GET, PATCH, PUT, DELETE, HEAD] path: description: | The HTTP request path excluding the database prefix (`/_db/`).