discovery, scrape: add static/DNS target discovery and single-target HTTP scrape helper

Aperta
#36 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
prometheus, rust

Direzione di ricerca

Start with the planned discovery and scrape components in README.md and compare the referenced otel-arrow implementations in prometheus_receiver/config.rs and prometheus_receiver/mod.rs with Prometheus's scrape.go negotiation behavior. Define and implement decoupled APIs for static and DNS discovery, including A, AAAA, and SRV records, and single-target HTTP scraping with the listed headers, compression, limits, metadata, and !Send runtime support. Done means these capabilities are reusable independently of a global scheduler.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

open-telemetry/otel-arrow#4630 currently hand-rolls static target URL normalization in prometheus_receiver/config.rs#L93-L131, basic A/AAAA dns_sd_targets lookup in prometheus_receiver/mod.rs#L85-L135, and uncompressed reqwest HTTP fetches in prometheus_receiver/mod.rs#L341-L449.

These correspond directly to the planned discovery and scrape components in README.md#L31-L32, and keeping them decoupled from a global background scheduler matters for thread-per-core consumers like otel-arrow, where shared target coordination supplies assigned targets to per-core !Send LocalSet workers.

Proposed changes:

  1. Build initial discovery support for static_configs and dns_sd_configs covering A, AAAA, and SRV records, refresh intervals, and standard __address__, __scheme__, __metrics_path__, and __meta_dns_* target labels.
  2. Build a reusable single-target HTTP scrape helper in scrape that handles Accept and Accept-Encoding negotiation for gzip and zstd matching scrape/scrape.go#L812-L820, X-Prometheus-Scrape-Timeout-Seconds, User-Agent, body_size_limit, and scrape outcome metadata for up and scrape_duration_seconds.
  3. Keep the discovery and single-target scrape APIs usable from !Send single-threaded runtimes so otel-arrow can drive target discovery in a shared coordinator and execute HTTP scrapes on per-core local workers.
Lingua principale
Rust
Stelle
27
Fork
5
Merge medio
1g 15h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prometheus/scrape.rs

Tutte le issue di prometheus/scrape.rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.