Skip to content

[RUN-2904] Missing documentation on metrics#1809

Merged
fdevans merged 6 commits into
4.0.xfrom
docs/run-2904-metrics-field-reference
May 26, 2026
Merged

[RUN-2904] Missing documentation on metrics#1809
fdevans merged 6 commits into
4.0.xfrom
docs/run-2904-metrics-field-reference

Conversation

@Jesus-Osuna-M
Copy link
Copy Markdown
Contributor

@Jesus-Osuna-M Jesus-Osuna-M commented May 25, 2026

Jira ticket

RUN-2904

Description

Adds a Metric Types Reference section to the API docs immediately after the GET /api/V/metrics/metrics JSON example. Explains every field for all four Dropwizard Metrics types (Gauge, Counter, Meter, Timer), including percentile semantics (p50–p999), the difference between EWMA rates (m1/m5/m15_rate) and the historical mean_rate, and a performance analysis tip.

Testing instructions

  • Navigate to the API Reference page and find the Metric Types Reference section (after the large JSON block in the Metrics Data section).
  • Verify all four metric type tables render correctly: Gauge, Counter, Meter, Timer.
  • Verify all Timer fields are documented: count, min, max, mean, stddev, p50p999, m1_rate, m5_rate, m15_rate, mean_rate, duration_units, rate_units.
  • Verify the Dropwizard Metrics link works.

@Jesus-Osuna-M Jesus-Osuna-M force-pushed the docs/run-2904-metrics-field-reference branch from b518772 to 2d49f95 Compare May 25, 2026 17:47
@Jesus-Osuna-M Jesus-Osuna-M force-pushed the docs/run-2904-metrics-field-reference branch from 2d49f95 to 0e2bc3b Compare May 25, 2026 17:48
Jesus-Osuna-M and others added 4 commits May 25, 2026 13:49
…description

- Document the `histograms` top-level key (previously undocumented despite
  always being present in the response)
- Replace hardcoded `seconds` unit in Timer duration fields with
  `see duration_units`; actual instances return `nanoseconds`, not `seconds`
- Update Timer intro to mention both `"seconds"` and `"nanoseconds"` as
  possible values for `duration_units`
- Merge Duration/Rate subtables into a single Timer table for clarity;
  `duration_units` and `rate_units` are metadata for the full timer, not
  exclusively rate fields
- Fix `mean_rate` description in Meter: replace "it decays toward 0 as the
  server runs longer without new events" with the more precise "as uptime
  increases without proportional new events, this value decreases toward 0"
- Update intro sentence to reflect five top-level keys (was four)

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace `> **Tip:**` blockquote and bare ::: tip blocks (missing blank
lines) with the standard VitePress container syntax used throughout the file.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jesus-Osuna-M Jesus-Osuna-M marked this pull request as ready for review May 25, 2026 18:43
@Jesus-Osuna-M Jesus-Osuna-M requested review from a team and Copilot May 25, 2026 18:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Metric Types Reference” section to the Metrics API documentation to explain the fields returned for each Dropwizard metrics type, helping readers interpret gauges/counters/meters/timers (and histograms) in the /metrics/metrics response.

Changes:

  • Introduces a Metric Types Reference section with per-type field tables (Gauge, Counter, Histogram, Meter, Timer).
  • Adds a performance-analysis tip explaining how to interpret percentiles vs mean, and EWMA rates vs mean rate.

Comment thread docs/api/index.md Outdated

### Metric Types Reference

Rundeck exposes metrics via [Dropwizard Metrics](https://metrics.dropwizard.io/). The response from `GET /api/V/metrics/metrics` contains five top-level keys — `gauges`, `counters`, `histograms`, `meters`, and `timers` — each holding a map of named metrics. The following tables describe every field for each metric type.
Comment thread docs/api/index.md Outdated
Comment on lines +1373 to +1385
| Field | Type | Unit | Description |
|----------|---------|------------------------|---------------------------------------------------------------------------------------------|
| `count` | integer | samples | Total number of values recorded since the server started. |
| `min` | number | see `duration_units` | Minimum recorded value. |
| `max` | number | see `duration_units` | Maximum recorded value. |
| `mean` | number | see `duration_units` | Arithmetic mean of all recorded values. |
| `stddev` | number | see `duration_units` | Standard deviation of recorded values. |
| `p50` | number | see `duration_units` | 50th percentile (median): 50% of values were at or below this. |
| `p75` | number | see `duration_units` | 75th percentile: 75% of values were at or below this. |
| `p95` | number | see `duration_units` | 95th percentile: 95% of values were at or below this. |
| `p98` | number | see `duration_units` | 98th percentile: 98% of values were at or below this. |
| `p99` | number | see `duration_units` | 99th percentile: 99% of values were at or below this. |
| `p999` | number | see `duration_units` | 99.9th percentile: 99.9% of values were at or below this. |
- Clarify intro sentence: response has a top-level `version` string plus
  five metric map keys, not just five top-level keys
- Fix Histogram unit column: replace "see \`duration_units\`" with "—"
  since \`duration_units\` is a Timer-only field and histograms do not
  expose a units key in the API response

Co-authored-by: Cursor <cursoragent@cursor.com>
@fdevans fdevans added this to the 6.0.0 milestone May 26, 2026
@fdevans fdevans merged commit a4e64bf into 4.0.x May 26, 2026
3 of 4 checks passed
@fdevans fdevans deleted the docs/run-2904-metrics-field-reference branch May 26, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants