Loki: Fix redundant escaping in adhoc filter with regex match (#56447)

* Loki: Fix redundant escaping in adhoc filter with regex match

* Update data.js

* Simplify test

* Simplify test

* Update

* Add more tests
This commit is contained in:
Ivana Huckova
2022-10-07 16:21:59 +02:00
committed by GitHub
parent d945091ff1
commit a4c5801440
3 changed files with 65 additions and 26 deletions
+2 -2
View File
@@ -125,8 +125,8 @@ async function main() {
await sleep(getNextSineWaveSleepDuration());
const timestampMs = new Date().getTime();
const item = getRandomLogItem(step + 1)
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data'});
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data'});
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data', instance: 'server\\1', job: '"grafana/data"'});
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data', instance: 'server\\2', job: '"grafana/data"'});
}
}