Skip to content

docs: clarify /metrics is JSON, not Prometheus#143

Merged
pdf-amzn merged 1 commit into
ExtendDB:mainfrom
yesyayen:docs/metrics-format-correction
May 29, 2026
Merged

docs: clarify /metrics is JSON, not Prometheus#143
pdf-amzn merged 1 commit into
ExtendDB:mainfrom
yesyayen:docs/metrics-format-correction

Conversation

@yesyayen
Copy link
Copy Markdown
Contributor

What

Correct the documentation to match reality: /metrics returns JSON, not Prometheus exposition format.

Changes:

  • Update README, AGENTS.md, 5 design docs, and 3 manuals to describe the actual JSON schema and the Amazon DynamoDB CloudWatch-style metric names and dimensions it uses.
  • Drop the unused metrics-exporter-prometheus dependency.

Why

Wiring local Grafana against ExtendDB, I expected Prometheus exposition format and got JSON. Match docs with whats implemented.

Closes # n/a

Testing done

Live /metrics capture against a local server:

$ curl -ksS -i 'https://127.0.0.1:8000/metrics?window=LastDay'
HTTP/2 200
content-type: application/json

Trimmed real response (field names and structure unmodified):

{
  "metrics": [
    {
      "metric": "SuccessfulRequestLatency",
      "dimensions": [{ "TableName": "abac-prod-c73b90ce" }, { "Operation": "CreateTable" }],
      "window": "LastDay",
      "sum": 11521.0, "count": 1, "min": 11521.0, "max": 11521.0
    },
    {
      "metric": "UserErrors",
      "dimensions": [{ "TableName": "extenddb-ie-test-cc0e7284" }, { "Operation": "DescribeTable" }],
      "window": "LastDay",
      "sum": 1.0, "count": 1, "min": 1.0, "max": 1.0
    },
.
.
.
  ],
  "source": "database"
}

This is structured JSON with typed dimension keys, not line-oriented text with # HELP / # TYPE headers, so a Prometheus scraper cannot consume it.

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace) (no Rust source changed)
  • Code is formatted (cargo fmt --check) (no Rust source changed)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic) (no Rust source changed)
  • I have added or updated tests for new functionality (n/a, documentation)
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (none)
  • If this changes the wire protocol, Storage trait, auth model, on-disk format, or public CLI surface, an RFC has been accepted or is linked below. Otherwise, an ADR captures the decision. (n/a, documentation)

ADR / RFC: n/a

Breaking changes

None.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0 and I agree to the Developer Certificate of Origin (DCO). See CONTRIBUTING.md for details.

@pdf-amzn pdf-amzn force-pushed the docs/metrics-format-correction branch from e0538e5 to 3c8daa4 Compare May 29, 2026 16:11
@pdf-amzn pdf-amzn merged commit 80d7125 into ExtendDB:main May 29, 2026
3 checks passed
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.

2 participants