Skip to content

Fix ES:QL Driver logging for 4xx errors and cancellations#140905

Merged
shmuelhanoch merged 3 commits intomainfrom
fix/esql-driver-4xx-logging
Feb 8, 2026
Merged

Fix ES:QL Driver logging for 4xx errors and cancellations#140905
shmuelhanoch merged 3 commits intomainfrom
fix/esql-driver-4xx-logging

Conversation

@shmuelhanoch
Copy link
Copy Markdown
Contributor

@shmuelhanoch shmuelhanoch commented Jan 19, 2026

Fix ES:QL Driver logging for 4xx errors and cancellations

Reduces log noise by logging 4xx client errors (including cancellations) at DEBUG instead of WARN/ERROR.

Problem:

Over 80% of ES:QL errors in serverless are from user cancellations, which are expected user actions, not system failures. These were logged at WARN/ERROR, creating noise.

Solution:

TaskCancelledException is already handled separately at DEBUG level
RuntimeException with 4xx status codes (400-499) are now logged at DEBUG level
5xx server errors continue to be logged at WARN level

Impact:

Reduces log noise from expected client actions while preserving visibility into actual system failures.

Closes #138008

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @shmuelhanoch, I've created a changelog YAML for you.

@shmuelhanoch shmuelhanoch force-pushed the fix/esql-driver-4xx-logging branch 2 times, most recently from 56f296b to f34737f Compare January 26, 2026 16:06
@shmuelhanoch shmuelhanoch force-pushed the fix/esql-driver-4xx-logging branch from 480db7e to 700ca2d Compare February 3, 2026 11:21
@shmuelhanoch shmuelhanoch marked this pull request as ready for review February 3, 2026 11:21
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 3, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @shmuelhanoch, I've created a changelog YAML for you.

@shmuelhanoch shmuelhanoch force-pushed the fix/esql-driver-4xx-logging branch 2 times, most recently from 2f8a35f to c616cb5 Compare February 5, 2026 12:19
shmuelhanoch and others added 3 commits February 8, 2026 16:59
Reduce log noise by logging 4xx client errors (including TaskCancelledException)
at DEBUG level instead of WARN/ERROR. This addresses the issue where over 80%
of ES:QL errors in serverless are due to user cancellations, which are expected
user actions rather than system failures.

- TaskCancelledException already handled separately at DEBUG level
- RuntimeException with 4xx status codes now logged at DEBUG level
- 5xx server errors continue to be logged at WARN level

Relates to #138008
@shmuelhanoch shmuelhanoch force-pushed the fix/esql-driver-4xx-logging branch from c616cb5 to aa379e3 Compare February 8, 2026 14:59
@shmuelhanoch shmuelhanoch enabled auto-merge (squash) February 8, 2026 15:00
@shmuelhanoch shmuelhanoch merged commit bc25275 into main Feb 8, 2026
36 checks passed
@shmuelhanoch shmuelhanoch deleted the fix/esql-driver-4xx-logging branch February 8, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ES:QL Logging: Driver 4xx and TaskCancelledExceptions should not be logged as errors

4 participants