mirror of https://github.com/grafana/loki
Test multi-tenant context propagation. (#5620)
**What this PR does / why we need it**: The original change injected the user id when the org id was required to fetch all data. **Which issue(s) this PR fixes**: Fixes grafana/loki-private#230 **Special notes for your reviewer**: The changes can be tested as follows 1. Change working directory to `tools/dev/loki-boltdb-storage-s3`. 2. Call `./compose-up.sh` to boot the cluster. 3. Query the logs with ``` curl -v -X GET -G "http://localhost:8007/loki/api/v1/query_range" -H "X-Scope-OrgID: 1|2" --data-urlencode 'query={compose_service=~"log-gen.*"}' | jq '.data.result[].stream' ``` It will should two streams with `__tenant_id: 1` and `__tenant_id_: 2` as part of the labels. **Checklist** - [ ] Documentation added - [ ] Tests updated - [ ] Add an entry in the `CHANGELOG.md` about the changes.pull/5521/head^2
parent
0ca425d471
commit
1deacceca9
Loading…
Reference in new issue