cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

metrics: gen-metrics command does not collect all possible metrics #132176

Open angles-n-daemons opened 1 month ago

angles-n-daemons commented 1 month ago

Describe the problem After some discussion, it seems that the cockroach gen metric-list command is meant to capture and document all possible metrics which can be omitted by the system, but as it stands currently this isn't the case. Metrics like security.certificate.* and seconds_until_enterprise_license_expiry do not appear in the [metrics page](https://www.cockroachlabs.com/docs/stable/metrics

To Reproduce To validate this, you can run cockroach gen metric-list | grep security to verify that no security metrics are captured. lem.

Environment:

Additional context Unsure the exact % right now, but as it stands the discoverability and documentation of some metrics in the system is hampered by this.

Jira issue: CRDB-42864

blathers-crl[bot] commented 1 month ago

Hi @angles-n-daemons, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

angles-n-daemons commented 1 month ago

Notes: After some investigation, I've found that metrics must be registered to be surfaced and some types of metrics require direct measurement. For example, a labelled counter will not appear in _status/vars unless it's incremented or set beforehand.

With the above information believe that there are four possible reasons why metrics would not appear in the documentation: