From a4456f9498da970e39cf99245cf921c8c9bfed97 Mon Sep 17 00:00:00 2001 From: Ali Naqvi Date: Thu, 11 Dec 2025 15:06:08 +0800 Subject: [PATCH] fix(modules): [PPT-2332] fix logQL search query --- shard.lock | 4 ++-- src/placeos-rest-api/controllers/modules.cr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shard.lock b/shard.lock index 75bc9a4b..882567bf 100644 --- a/shard.lock +++ b/shard.lock @@ -211,7 +211,7 @@ shards: placeos-frontend-loader: git: https://github.com/placeos/frontend-loader.git - version: 2.7.1+git.commit.9972ac267ea4a24a4a120a449c7c05f7b26ad54b + version: 2.7.1+git.commit.61aa561e3cfd1dd44e59a84d8e5051a386f2fcae placeos-log-backend: git: https://github.com/place-labs/log-backend.git @@ -267,7 +267,7 @@ shards: search-ingest: git: https://github.com/placeos/search-ingest.git - version: 2.11.3+git.commit.15283cd94ced2726c056be7bfb3afc36c6ae1254 + version: 2.11.3+git.commit.f7624ba5319a284db7294c784daed3fe08f7cd25 secrets-env: # Overridden git: https://github.com/spider-gazelle/secrets-env.git diff --git a/src/placeos-rest-api/controllers/modules.cr b/src/placeos-rest-api/controllers/modules.cr index d2abd46b..222d2f02 100644 --- a/src/placeos-rest-api/controllers/modules.cr +++ b/src/placeos-rest-api/controllers/modules.cr @@ -246,7 +246,7 @@ module PlaceOS::Api client = Loki::Client.from_env labels = client.list_labels.data stream = labels.try &.includes?("container") ? "container" : "app" - query = %({#{stream}="core"} | source = "#{current_module.id}" |~ "(?i)exception" | level = "ERROR|[E]") + query = %({#{stream}="core"} | source = "#{current_module.id}" |~ "(?i)exception" | level =~ "ERROR|[E]") results = client.query_range(query, 20, error_timestamp - 1.hour, error_timestamp, Loki::Direction::Backward) entries = Array(String).new results.response_data.result.as(Loki::Model::Streams).each do |res_stream|