Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect handling of variables with special characters and multiple values #65

Closed
Loori-R opened this issue Aug 22, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Loori-R
Copy link
Contributor

Loori-R commented Aug 22, 2024

Hi! Thank you for feature. I tried this out and found some bugs.

Multi-value seems doesn't work. I have query:
consumer: $consumer
Choose 2 options and get nothing. From google devtools in network i see following query:
consumer: <null>|admin
I think it should have looked like this:
consumer: ("<null>" OR "admin")

Query works badly with values with special characters. I have query:
proxy_list: $proxy_list
From google devtools in network i see following query:
proxy_list: api_name:clientid-persons-v1;v1\\.14\\.1
I think it should have looked like this:
proxy_list: "api_name:clientid-persons-v1;v1.14.1"

I think need to add quotes and work through the moment with multi-value

Originally posted by @Neko-Follower in #40 (comment)

@Loori-R Loori-R self-assigned this Aug 22, 2024
@Loori-R Loori-R added the bug Something isn't working label Aug 22, 2024
Loori-R added a commit that referenced this issue Aug 27, 2024
@pgassmann
Copy link

pgassmann commented Aug 27, 2024

multi value doesn't work yet as expected.
I would like to filter logs based on multiple selected values, of e.g. the host label

if using regexp filter host:~"$host" it partially works, but matches anything with thatsubstring. also, regexp filter is not good for performance

ideally the value could be passed to the multi exact :in() filter.

host:in($host) and compose_project:~"$compose_project" and $log_query

grafik

Workaround:
regexp filter with start ^ and end $ matcher in single quotes:

host:~'^$host$' and compose_project:~'^$compose_project$' and compose_service:~'^$compose_service$' and $log_query

also works in the variables section for filtering field_value results with query
grafik
grafik

@dmitryk-dk
Copy link
Contributor

Hi @Loori-R ! The issue was fixed in the v0.4.0 release. Fill free to reopen the issue if you find some problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants