mirror of https://github.com/grafana/loki
inflight-logging: Add extra metadata to inflight requests logging (#11243)
**What this PR does / why we need it**:
logging: Add extra metadata to inflight requests
This adds extra metadata (similar to what we have in `metrics.go`) but
for queries in in-flight (both started and retrying)
Changes:
Adds following data
1. Query Hash
2. Start and End time
3. Start and End delta
4. Length of the query
5. Moved the helper util to `queryutil` package because of cyclic
dependencies with `logql` package.
**Which issue(s) this PR fixes**:
Fixes #<issue number>
**Special notes for your reviewer**:
Find the screenshots of log entries looks like (both in `retry.go` and
`roundtrip.go`)


**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] 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
- [ ] 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)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](0d4416a4b0)
---------
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
pull/10932/head
parent
c716e498ad
commit
30d0030bf9
Loading…
Reference in new issue