Skip to content

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

@andythsu

Description

@andythsu

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions