Skip to content

[Feature request] Expose more metrics in /v1/info #25619

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

Open
andythsu opened this issue Apr 17, 2025 · 2 comments
Open

[Feature request] Expose more metrics in /v1/info #25619

andythsu opened this issue Apr 17, 2025 · 2 comments

Comments

@andythsu
Copy link
Member

Currently the only way to get stats of Trino cluster is through /ui/api/stats. However, this endpoint is protected by auth. It would be nice if we can expose the stats to public endpoint, such as /v1/info. Looking at current stats it exposes, it should be harmless to expose everything in /v1/info

  "runningQueries": 0,
  "blockedQueries": 0,
  "queuedQueries": 0,
  "activeCoordinators": 1,
  "activeWorkers": 2,
  "runningDrivers": 0,
  "totalAvailableProcessors": 24,
  "reservedMemory": 0.0,
  "totalInputRows": 671056,
  "totalInputBytes": 16269490,
  "totalCpuTimeSecs": 4

This will benefit Trino Gateway as QueryCountBasedRouter relies on these stats to work properly.

Happy to send a PR if this is a good idea :)

@nikita-sheremet-java-developer
Copy link

nikita-sheremet-java-developer commented Apr 18, 2025

You can expose all of these metrics just set up JMX - with prometheus that will grab and store metrics from Trino and Grafana - for metrics visualization.

For now this looks like duplicating feature. I am not sure that Trino maintainers allow this.

@andythsu
Copy link
Member Author

@nikita-sheremet-java-developer this sounds like a good approach. I will check it out. Thanks!

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

No branches or pull requests

2 participants