From 90574d3e761a7324ba52236e7a0473eb8c7088db Mon Sep 17 00:00:00 2001 From: akvlad Date: Wed, 29 Jan 2025 10:45:50 +0200 Subject: [PATCH] fix --- lib/handlers/otlp_log_push.js | 2 +- traceql/clickhouse_transpiler/attr_condition.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/handlers/otlp_log_push.js b/lib/handlers/otlp_log_push.js index 4334714..8041920 100644 --- a/lib/handlers/otlp_log_push.js +++ b/lib/handlers/otlp_log_push.js @@ -52,7 +52,7 @@ async function handle (req, res) { } await Promise.all(promises) } catch (error) { - await asyncLogError(error) + await asyncLogError(error, req.log) res.status(500).send({ error: 'Internal Server Error' }) } } diff --git a/traceql/clickhouse_transpiler/attr_condition.js b/traceql/clickhouse_transpiler/attr_condition.js index 406d617..d9a709e 100644 --- a/traceql/clickhouse_transpiler/attr_condition.js +++ b/traceql/clickhouse_transpiler/attr_condition.js @@ -72,7 +72,7 @@ module.exports = class Builder { for (const term of self.terms) { const sqlTerm = self.getTerm(term) self.sqlConditions.push(sqlTerm) - if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name)/)) { + if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name|status)/)) { continue } self.where.push(sqlTerm) @@ -181,6 +181,9 @@ module.exports = class Builder { case 'name': key = 'name' break + case 'status': + key = 'status' + break default: throw new Error(`unsupported attribute ${key}`) }