Skip to content

http_config: add Prometheus HTTPClientConfig and reqwest client builder - #44

Merged
bwplotka merged 3 commits into
mainfrom
bwplotka/http-config
Nov 19, 2026
Merged

bwplotka merged 3 commits into
mainfrom
bwplotka/http-config

Conversation

@bwplotka

@bwplotka bwplotka commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Adds the standalone http-config Cargo feature and expfmt::http_config module implementing Prometheus HTTPClientConfig schema parsing, validation, set_directory, secret redaction in Debug and Serialize, and reqwest (rustls + http2) client and request builders reusable across HTTP service discovery and scraping. Part of prometheus/scrape.rs#36.

Stack:

  1. discovery: add TargetGroup, StaticConfig, and Prometheus duration helpers #39 discovery: add TargetGroup, StaticConfig, and Prometheus duration helpers
  2. discovery/dns: add DNS service discovery (dns_sd_configs) #43 discovery/dns: add DNS service discovery (dns_sd_configs)
  3. http_config: add Prometheus HTTPClientConfig and reqwest client builder #44 http_config: add Prometheus HTTPClientConfig and reqwest client builder (this PR)
  4. discovery/kubernetes: add pod service discovery (role: pod) #45 discovery/kubernetes: add pod service discovery (role: pod)

Commits in reading order:

  1. 64ace43: http_config: add Prometheus HTTPClientConfig schema, validation, and secret redaction
  2. ed9f909: http_config: add reqwest client builder, header injection, and HTTPS mTLS tests
Intentional differences from Go

@saswatamcode saswatamcode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally seems great, some combined human + AI comments.

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for solid review! Addresed

…eader checks

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
…ock extraction

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
…action tests

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
@bwplotka
bwplotka force-pushed the bwplotka/http-config branch from b52fd55 to 095233e Compare November 19, 2026 10:57
@bwplotka
bwplotka merged commit 932a982 into main Nov 19, 2026
4 checks passed
@bwplotka
bwplotka deleted the bwplotka/http-config branch November 19, 2026 14:44
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