Skip to content

Commit

Permalink
Support new Loki 3.0 service_name
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 authored Apr 10, 2024
1 parent 562f25b commit e3aece6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion olli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_token_logs(self, token: TokenConfig) -> dict[str, Any]:
case_filter = "(?i)" if not token.case_sensitive else ""

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

0 comments on commit e3aece6

Please sign in to comment.