Add generated OpenMetrics scrape bodies to HTTP blackhole#1895
Conversation
This comment has been minimized.
This comment has been minimized.
d2c5b17 to
87e2bc9
Compare
blt
left a comment
There was a problem hiding this comment.
This is looking good. @scottopell give me a ping when it's open for review and I'll have a look.
There was a problem hiding this comment.
Pull request overview
This PR adds a reusable lading_payload::openmetrics generator and wires it into the HTTP blackhole so it can serve a generated Prometheus/OpenMetrics-style text exposition body via a new openmetrics body_variant, avoiding embedding large static response strings in configs.
Changes:
- Added
lading_payload::openmetricsmodule that deterministically precomputes a scrape response body plus tests (unit + proptest). - Extended HTTP blackhole config with
body_variant.openmetricsand precomputes the body duringHttp::new. - Added an example config and documented the new variant in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
lading/src/blackhole/http.rs |
Adds openmetrics body variant, deserialization support, and a config test for the new variant. |
lading_payload/src/openmetrics.rs |
Implements deterministic, precomputed text exposition generator with validation and tests. |
lading_payload/src/lib.rs |
Exposes the new openmetrics module and re-exports OpenMetrics. |
examples/lading-openmetrics.yaml |
Provides an example HTTP blackhole configuration serving generated scrape text. |
CHANGELOG.md |
Notes the new HTTP blackhole openmetrics body variant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
faed763 to
3bfa033
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3bfa0338d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ee6ef9262
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 410ae60554
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67dae111da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@blt the bots are happy, ready for a human stamp |
Summary
Adds a generated OpenMetrics scrape body for the HTTP blackhole, so scrape-based tests can serve realistic metrics without embedding static response text.
Changed
Why
This gives scrape tests a deterministic, spec-shaped OpenMetrics target while keeping HTTP blackhole configuration concise and backward-compatible.