**What this PR does / why we need it**:
Removes the following embedded cache metrics since
`loki_cache_request_duration_seconds` (which instruments requests made
to all the caches) [already covers
them](6a07988491/pkg/storage/chunk/cache/cache.go (L110)):
- `querier_cache_added_total`
- `querier_cache_gets_total`
- `querier_cache_misses_total`
Updates the namespace and subsystem for the following metrics
- `querier_cache_added_new_total` is renamed to
`loki_embeddedcache_added_new_total`
- `querier_cache_evicted_total` is renamed to
`loki_embeddedcache_evicted_total`
- `querier_cache_entries` is renamed to `loki_embeddedcache_entries`
- `querier_cache_memory_bytes` is renamed to
`loki_embeddedcache_memory_bytes`
Removes already deprecated metric `querier_cache_stale_gets_total`
**Which issue(s) this PR fixes**:
Fixes #<issue number>
**Special notes for your reviewer**:
**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [x] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [x] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e3ec)
* [10693](https://github.com/grafana/loki/pull/10693) **ashwanthgoli** Embedded cache: Updates the metric prefix from `querier_cache_` to `loki_embeddedcache_` and removes duplicate metrics.
@ -69,6 +69,21 @@ This new metric will provide a more clear signal that there is an issue with ing
1. `frontend.embedded-cache.max-size-mb` Embedded results cache size now defaults to 100MB.
#### Embedded cache metric changes
- The following embedded cache metrics are removed. Instead use `loki_cache_fetched_keys`, `loki_cache_hits`, `loki_cache_request_duration_seconds` which instruments requests made to the configured cache (`embeddedcache`, `memcached` or `redis`).
- `querier_cache_added_total`
- `querier_cache_gets_total`
- `querier_cache_misses_total`
- The following embedded cache metrics are renamed:
- `querier_cache_added_new_total` is renamed to `loki_embeddedcache_added_new_total`
- `querier_cache_evicted_total` is renamed to `loki_embeddedcache_evicted_total`
- `querier_cache_entries` is renamed to `loki_embeddedcache_entries`
- `querier_cache_memory_bytes` is renamed to `loki_embeddedcache_memory_bytes`
- Already deprecated metric `querier_cache_stale_gets_total` is now removed.