Skip to content

Commit e3aece6

Browse files
authored
Support new Loki 3.0 service_name
1 parent 562f25b commit e3aece6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

olli/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_token_logs(self, token: TokenConfig) -> dict[str, Any]:
3131
case_filter = "(?i)" if not token.case_sensitive else ""
3232

3333
resp = httpx.get(self.route("query_range"), params={
34-
"query": f'{{job=~"({job_regex})"}} |~ "{case_filter}{token.token}"',
34+
"query": f'{{service_name=~"({job_regex})-.+"}} |~ "{case_filter}{token.token}"',
3535
"start": f"{start_ts:0.0f}",
3636
"limit": LOKI_CONFIG.max_logs,
3737
})

0 commit comments

Comments
 (0)