Skip to content

Add slow query log#38

Merged
rdettai-sk merged 1 commit intosekoiafrom
feat-slow-query-logs
May 4, 2026
Merged

Add slow query log#38
rdettai-sk merged 1 commit intosekoiafrom
feat-slow-query-logs

Conversation

@rdettai-sk
Copy link
Copy Markdown
Collaborator

@rdettai-sk rdettai-sk commented Apr 30, 2026

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).

Copilot AI review requested due to automatic review settings April 30, 2026 15:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TooManySplits error.
  • Remove the deprecated/unused errors field from SearchResponse across protobuf, REST models, and tests/clients.
  • Update test logging initialization in quickwit-common (moving from env_logger to tracing-subscriber under 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.

Comment thread quickwit/quickwit-common/src/lib.rs Outdated
Comment thread quickwit/quickwit-search/src/root.rs
Comment thread quickwit/quickwit-search/src/metrics_trackers.rs
Comment thread quickwit/quickwit-search/src/metrics_trackers.rs
@rdettai-sk rdettai-sk force-pushed the feat-slow-query-logs branch from 12db121 to 7c01d78 Compare April 30, 2026 19:29
This commit also cleans up an unused error field from the search response and improves the metrics with a too-many-split label.
@rdettai-sk rdettai-sk force-pushed the feat-slow-query-logs branch from 7c01d78 to ad19f31 Compare May 4, 2026 07:22
@rdettai-sk rdettai-sk merged commit 08520cd into sekoia May 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants