**What this PR does / why we need it**:
Refactors Loki to inject logger from the constructors instead of using
global logger variable. It is generally considered a good practice.
**Which issue(s) this PR fixes**:
[Fixes #<issue
number>](https://github.com/grafana/loki-private/issues/810)
**Special notes for your reviewer**:
**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] 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. <!--
TODO(salvacorts): Add example PR -->
**What this PR does / why we need it**:
`Test_ProxyEndpoint_SummaryMetrics` does not wait for `compareResponses`
call to finish which causes the test to fail as the expected metric
response does not match
this pr updates the test to wait for `responses_compared_total` to be
set to 1 before asserting `missingMetrics`
**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**)
- [ ] Documentation added
- [x] Tests updated
- [ ] `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)
**What this PR does / why we need it**:
Sometimes we want to not just fail a querytee but also report results on
the comparison between expected and actual results. That's why querytee
is extended with special metrics to give more insights into the
differences.
**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [x] Tests updated
- [ ] `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)
The `io/ioutil` package has been deprecated in Go 1.16 (See
https://pkg.go.dev/io/ioutil). This PR replaces the existing `io/ioutil`
functions with their new definitions in `io` and `os` packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Fork Cortex `tools/querytee`.
* Use forked querytee instead of Cortex one.
* Add `loki/tools` to list of possible paths.
* Add opts to querytee proxy.