Log queriesWithPreAggregations in production
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Is your feature request related to a problem? Please describe.**
When running cube-core in production mode, it is currently impossible to inspect logs to see which ones have used preAggregations and which one haven't since the entry is filtered [here](https://github.com/cube-js/cube/blob/75565cfc46b237d36c6a5bca9bdb259f2d54ea4b/packages/cubejs-api-gateway/src/gateway.ts#L1797-L1805).
It currently always return `0` even though the queries have gone through pre-aggregations, which can lead to confusion when debugging queries.
**Describe the solution you'd like**
I understand that these fields might be of a debugging nature, but it would be great if we could enable these to still be added to the logs, based on a flag which we could enable in production through env variables.
If possible, it would be great to simply always have it since `queriesWithPreAggregations` is always added to the logs.
**Describe alternatives you've considered**
I don't think there is currently a clean way of doing this, my workaround currently is to copy the queries made in production and test them out in a dev playground connected to our cubestore to test if the queries effectively goes through a pre-aggregation or not.
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.