Usage insights query caching (#47893)

* Updates queryResponse tests to include new cachedResponse bool

* Adds cachedResponse bool to QueryResponse

* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests

* Adds totalQueries and cachedQueries counts to the data-request events

* Adds new metrics and their descriptions to docs

* uses more descriptive variable name

* changes naming

* removes hyphen in docs

* extracts calculations to own lines prior to assignment
This commit is contained in:
owensmallwood
2022-04-21 09:16:13 -06:00
committed by GitHub
parent f3743bb652
commit 9a4bd1f2d4
7 changed files with 117 additions and 11 deletions
@@ -45,6 +45,8 @@ Logs of usage insights contain the following fields, where the fields followed b
| `tokenId`\* | number | ID of the users authentication token. |
| `username`\* | string | Name of the Grafana user that made the request. |
| `userId`\* | number | ID of the Grafana user that made the request. |
| `totalQueries`\* | number | Number of queries executed for the data request. |
| `cachedQueries`\* | number | Number of fetched queries that came from the cache. |
## Configuration