influxdata / influxdata/influxdb
metrics: Cache Performance
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
## Cache Performance Metrics
Right now we serve _little_ information on the new caches and their performance, so this ticket looks to add some basic metrics to track.
These names track with how we currently do Parquet cache tracking.
Update the `/metrics` endpoint to serve the following metrics:
### New Last Value Cache Metrics:
- [ ] **influxdb3_last_values_cache_response_duration_seconds_bucket**: Time to complete LVC queries bucketed into 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 10, inf seconds, per database, per cache (https://github.com/influxdata/influxdb/pull/26388)
- [ ] **influxdb3_last_values_cache_response_duration_seconds_sum**: Total time spent waiting on response from LVC, per database, per cache (https://github.com/influxdata/influxdb/pull/26388)
- [ ] **influxdb3_last_values_cache_response_duration_seconds_count**: Amount of queries to the LVC , per database, per cache. (https://github.com/influxdata/influxdb/pull/26388)
- [ ] **influxdb3_last_values_cache_size_bytes**: Total size of LVC in bytes, per database, per cache
- [ ] **influxdb3_last_values_cache_refresh_count**: Total number of times the LVC has been refreshed
### New Distinct Value Cache Metrics:
- [ ] **influxdb3_distinct_values_cache_response_duration_seconds_bucket**: Time to complete DVC queries bucketed into 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 10, inf seconds, per database, per cache
- [ ] **influxdb3_distinct_values_cache_response_duration_seconds_sum**: Total time spent waiting on response from DVC, per database, per cache
- [ ] **influxdb3_distinct_values_cache_response_duration_seconds_count**: Amount of queries to the DVC , per database, per cache.
- [ ] **influxdb3_distinct_values_cache_size_bytes**: Total size of DVC in bytes, per database, per cache
- [ ] **influxdb3_distinct_values_cache_refresh_count**: Total number of times the DVC has been refreshed
Contributor guide
Research direction
Start at the /metrics endpoint and inspect how Parquet cache tracking is currently exposed. Trace the Last Value Cache and Distinct Value Cache paths, then verify that the listed duration, size, and refresh metrics appear with the requested database and cache labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100