Add slow query log#38
Merged
rdettai-sk merged 1 commit intosekoiafrom May 4, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make it easier to extract slow queries by logging root search requests when they complete (success/error/partial), while also removing an unused errors field from the search response and refining root-search metrics with a “too-many-splits” label.
Changes:
- Add request-span based logging and status labeling for root search planning/execution, and enforce a max-splits-per-search limit via a dedicated
TooManySplitserror. - Remove the deprecated/unused
errorsfield fromSearchResponseacross protobuf, REST models, and tests/clients. - Update test logging initialization in
quickwit-common(moving fromenv_loggertotracing-subscriberunder the testsuite feature).
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| quickwit/quickwit-serve/src/search_api/rest_handler.rs | Update REST handler tests to match removed errors field. |
| quickwit/quickwit-serve/src/jaeger_api/rest_handler.rs | Update Jaeger REST handler tests to match removed errors field. |
| quickwit/quickwit-search/src/service.rs | Remove errors initialization from SearchResponse. |
| quickwit/quickwit-search/src/search_response_rest.rs | Remove errors from REST response model and conversion. |
| quickwit/quickwit-search/src/root.rs | Add request span + split-limit enforcement; record request attributes for completion logs/metrics. |
| quickwit/quickwit-search/src/metrics_trackers.rs | Add completion logging/status labeling and request span propagation for root search futures. |
| quickwit/quickwit-search/src/error.rs | Introduce TooManySplits error variant + map to BadRequest. |
| quickwit/quickwit-rest-client/src/rest_client.rs | Update REST client tests to match removed errors field. |
| quickwit/quickwit-rest-client/src/models.rs | Remove errors from REST client model. |
| quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs | Remove errors from generated SearchResponse. |
| quickwit/quickwit-proto/protos/quickwit/search.proto | Reserve the deprecated errors field tag in SearchResponse. |
| quickwit/quickwit-jaeger/src/lib.rs | Update tests to match removed errors field. |
| quickwit/quickwit-integration-tests/src/tests/update_tests/mod.rs | Update integration test assertions now that errors field is gone. |
| quickwit/quickwit-common/src/lib.rs | Change test logging setup + gate it behind testsuite feature. |
| quickwit/quickwit-common/Cargo.toml | Remove env_logger; add optional tracing-subscriber for testsuite. |
| quickwit/Cargo.lock | Lockfile updates reflecting dependency changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
12db121 to
7c01d78
Compare
This commit also cleans up an unused error field from the search response and improves the metrics with a too-many-split label.
7c01d78 to
ad19f31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Queries are now logged when they finish (success/error/cancelled). This makes it possible to extract slow queries quite easily.
This PR also cleans up an unused error field from the search response and improves the root search metrics with a too-many-split label.
Description
Describe the proposed changes made in this PR.
How was this PR tested?
Looking at the logs in the integration test (that's why I also modified the test log subscriber, the existing one has been anoying me for a while).