Skip to content

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

Draft
bwplotka wants to merge 2 commits into
bwplotka/discovery-dnsfrom
bwplotka/http-config
Draft

bwplotka wants to merge 2 commits into
bwplotka/discovery-dnsfrom
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

…secret redaction

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

Build configured reqwest clients (TLS CA/mTLS/min+max version, HTTP/1-only toggle, redirect policy, and proxy + proxy_connect_header) and apply basic_auth, authorization, bearer_token, and http_headers (values/secrets/files) to requests, with LocalSet HTTPS mTLS tests.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
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.

1 participant