Skip to content

Commit

Permalink
hotfix: summary CH 22 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Nov 28, 2023
1 parent 11adb1a commit 485d2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser/transpiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ module.exports.transpileSummary = (token, query, limit) => {
query.ctx = query.ctx || {}
query.ctx.stream = query.ctx.stream || []
const withQ = new Sql.With('sum_a', query)
const guessLevelCHExp = 'map(\'\', \'unknown\', \'debu\', \'debug\', \'info\', \'info\', \'warn\', \'warning\', \'erro\', \'error\', \'crit\', \'critical\', \'fata\', \'fatal\', \'I\', \'info\', \'W\', \'warning\', \'E\', \'error\', \'F\', \'fatal\')[arrayFirst(x -> notEmpty(x) , [lowerUTF8(regexpExtract(sum_a.string, \'(?i)(^|\\\\s|[\\]);|:,.])([\\[(<\\\']|Level=)?(debu|info|warn|erro|crit|fata)\', 3)), extract(sum_a.string, \'^([IWEF])[0-9]{4}(\\\\s|\\\\p{P})\')])]'
const guessLevelCHExp = 'map(\'\', \'unknown\', \'debu\', \'debug\', \'info\', \'info\', \'warn\', \'warning\', \'erro\', \'error\', \'crit\', \'critical\', \'fata\', \'fatal\', \'I\', \'info\', \'W\', \'warning\', \'E\', \'error\', \'F\', \'fatal\')[arrayFirst(x -> notEmpty(x) , [lowerUTF8(arrayMap(x -> x[3], extractAllGroupsVertical(sum_a.string, \'(?i)(^|\\\\s|[\\]);|:,.])([\\[(<\\\']|Level=)?(debu|info|warn|erro|crit|fata)\'))[1]), extract(sum_a.string, \'^([IWEF])[0-9]{4}(\\\\s|\\\\p{P})\')])]'
query = (new Sql.Select()).with(withQ).select(
[query.getParam(sharedParamNames.to), 'timestamp_ns'],
[new Sql.Raw('[(\'level\', _level)]::Array(Tuple(String,String))'), 'labels'],
Expand Down

0 comments on commit 485d2a8

Please sign in to comment.