QueryCountStatsMonitor doesn't track sql query metrics
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
QueryCountStatsMonitor provides the following query metrics
- `query/count`
- `query/success/count`
- `query/failed/count`
- `query/interrupted/count`
- `query/timeout/count`
It looks like these metrics don't track the sql queries invoked against the `druid/v2/sql` endpoint.
This could be because the Broker is tied to `BrokerQueryResource` as the `QueryCountStatsProvider` implementation and even if `SqlResource` implements `QueryCountStatsProvider`, it wouldn't work. Unless the `SqlResource` was isolated as such for a specific reason, I'd like to check the feasibility of merging `SqlResource` into `QueryResource` so that `druid/v2/sql` can take advantage of the query count stats monitoring within `QueryResource`.
@jihoonson Any thoughts on this?
Contributor guide
Research direction
Start by reading BrokerQueryResource, SqlResource, QueryResource, and QueryCountStatsProvider to trace how the Broker selects its query-count implementation for druid/v2/sql. Compare the resource wiring and determine whether SQL requests can use the existing monitoring path; done means the query, success, failed, interrupted, and timeout metrics track SQL endpoint requests, with coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- backend, observability-sre
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100