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

Trino Prometheus connector is converting all the metric names from Prometheus into Lowercase and hence, queries to prometheus are failing #8740

Closed
nikitag55 opened this issue Jul 31, 2021 · 1 comment · Fixed by #13745

Comments

@nikitag55
Copy link

nikitag55 commented Jul 31, 2021

I'm using Trino Prometheus Connector. Prometheus allows metrics names following regex pattern:

[a-zA-Z_:][a-zA-Z0-9_:]*.

which means that metric names with upper case letters are also allowed.

Now, I have some of the metrics with name like:

Client_mount_disk_cache_hit_requests_total

When I use Trino Prometheus connector and do a query like:

cur.execute("""SHOW TABLES""")

It outputs table name as client_mount_disk_cache_hit_requests_total instead of Client_mount_disk_cache_hit_requests_total i.e it converted it into lowercase.

Now, when I'm trying to query Client_mount_disk_cache_hit_requests_total metric/table further in Trino using:

cur.execute("""SELECT * FROM Client_mount_disk_cache_hit_requests_total""")

or

cur.execute("""SELECT * FROM client_mount_disk_cache_hit_requests_total""")

It throws error like:

"prometheus.default. client_mount_disk_cache_hit_requests_total' does not exist"

because Prometheus contains the metric as: Client_mount_disk_cache_hit_requests_total and not client_mount_disk_cache_hit_requests_total and Prometheus is case sensitive with metric names.

Trino is converting everything into Lowercase and hence, metrics are not queryable in Prometheus.

@ebyhr
Copy link
Member

ebyhr commented Aug 1, 2021

Relates to #17. Some connectors have case-insensitive matching config, but Prometheus connector doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants