Loki: Add format explanation to regex operations (#60518)

* change explain messages for regex operations

* update explain messages to use the more accurate RE2
This commit is contained in:
Gareth Dawson
2022-12-19 14:32:51 +00:00
committed by GitHub
parent da6f4067f7
commit 65f7b93e6b

View File

@@ -324,7 +324,7 @@ Example: \`\`error_level=\`level\` \`\`
orderRank: LokiOperationOrder.LineFilters,
renderer: getLineFilterRenderer('|~'),
addOperationHandler: addLokiOperation,
explainHandler: (op) => `Return log lines that match regex \`${op.params[0]}\`.`,
explainHandler: (op) => `Return log lines that match a \`RE2\` regex pattern. \`${op.params[0]}\`.`,
},
{
id: LokiOperationId.LineMatchesRegexNot,
@@ -346,7 +346,7 @@ Example: \`\`error_level=\`level\` \`\`
orderRank: LokiOperationOrder.LineFilters,
renderer: getLineFilterRenderer('!~'),
addOperationHandler: addLokiOperation,
explainHandler: (op) => `Return log lines that does not match regex \`${op.params[0]}\`.`,
explainHandler: (op) => `Return log lines that doesn't match a \`RE2\` regex pattern. \`${op.params[0]}\`.`,
},
{
id: LokiOperationId.LineFilterIpMatches,