Explore: Match queries that are longer than defined Graphite/Loki mapping (#34003)

This commit is contained in:
Piotr Jamróz
2021-05-12 16:10:38 +02:00
committed by GitHub
parent a7efe19167
commit 6ac43130f2
2 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,7 @@ function fromGraphite(graphiteQuery: GraphiteQueryModel, config: GraphiteToLokiQ
});
} else {
const targetNodes = graphiteQuery.segments.map((segment) => segment.value);
let mappings = config.mappings.filter((mapping) => mapping.matchers.length === targetNodes.length);
let mappings = config.mappings.filter((mapping) => mapping.matchers.length <= targetNodes.length);
for (let mapping of mappings) {
const matchers = mapping.matchers.concat();