Tempo: Downcase OR to or in Loki LogQL query (#106012)
Downcase 'OR' to 'or' Fixes: https://github.com/grafana/grafana/pull/93923\#issuecomment-2752216436 Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
This commit is contained in:
co-authored by
Piotr Jamróz
parent
6c84461b7a
commit
b9746cd8d4
@@ -200,7 +200,7 @@ describe('createSpanLinkFactory', () => {
|
|||||||
datasource: 'loki1_uid',
|
datasource: 'loki1_uid',
|
||||||
queries: [
|
queries: [
|
||||||
{
|
{
|
||||||
expr: '{cluster="cluster1", hostname="hostname1", service_namespace="namespace1"} | label_format log_line_contains_trace_id=`{{ contains "7946b05c2e2e4e5a" __line__ }}` | log_line_contains_trace_id="true" OR trace_id="7946b05c2e2e4e5a" | label_format log_line_contains_span_id=`{{ contains "6605c7b08e715d6c" __line__ }}` | log_line_contains_span_id="true" OR span_id="6605c7b08e715d6c"',
|
expr: '{cluster="cluster1", hostname="hostname1", service_namespace="namespace1"} | label_format log_line_contains_trace_id=`{{ contains "7946b05c2e2e4e5a" __line__ }}` | log_line_contains_trace_id="true" or trace_id="7946b05c2e2e4e5a" | label_format log_line_contains_span_id=`{{ contains "6605c7b08e715d6c" __line__ }}` | log_line_contains_span_id="true" or span_id="6605c7b08e715d6c"',
|
||||||
refId: '',
|
refId: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -424,11 +424,11 @@ function getQueryForLoki(
|
|||||||
let expr = '{${__tags}}';
|
let expr = '{${__tags}}';
|
||||||
if (filterByTraceID && span.traceID) {
|
if (filterByTraceID && span.traceID) {
|
||||||
expr +=
|
expr +=
|
||||||
' | label_format log_line_contains_trace_id=`{{ contains "${__span.traceId}" __line__ }}` | log_line_contains_trace_id="true" OR trace_id="${__span.traceId}"';
|
' | label_format log_line_contains_trace_id=`{{ contains "${__span.traceId}" __line__ }}` | log_line_contains_trace_id="true" or trace_id="${__span.traceId}"';
|
||||||
}
|
}
|
||||||
if (filterBySpanID && span.spanID) {
|
if (filterBySpanID && span.spanID) {
|
||||||
expr +=
|
expr +=
|
||||||
' | label_format log_line_contains_span_id=`{{ contains "${__span.spanId}" __line__ }}` | log_line_contains_span_id="true" OR span_id="${__span.spanId}"';
|
' | label_format log_line_contains_span_id=`{{ contains "${__span.spanId}" __line__ }}` | log_line_contains_span_id="true" or span_id="${__span.spanId}"';
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user