Metrics follow-ups from the operator-signals review: BReg scrape lock, offline check depth
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- prometheus, rust
- Domaine
- backend, observability
Piste de recherche
Start in crates/registry-breg/src/metrics.rs at with_scrape_deadline and trace where the queue_sample lock is taken relative to the ScrapeDeadline, then look at the Adapter job host's sample cache as the reference for sharing one in-flight sample between concurrent scrapes. For part 2, find the offline configuration check in the Evidence and Adapter crates and compare how they decode metricsListener.networkExposure against a product that substitutes the stand-in (BReg or Casework). Done means two concurrent scrapes stay within scrape_timeout on a slow database, and Evidence/Adapter keep checking the rest of the file past an ${ENV} value.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Two follow-ups from the review of #2745 (operator signals). Neither blocks it.
1. BReg: a second concurrent scrape can exceed the scrape timeout when the database is slow
crates/registry-breg/src/metrics.rs, with_scrape_deadline, holds the queue_sample lock for the whole sample. It starts the 5 second ScrapeDeadline only once the lock is held, by design: lock contention never counts as a failed read.
With two Prometheus servers scraping the same BReg (a common high-availability pair) and a degraded database whose reads run to the deadline, the second scrape waits about 5 seconds for the lock and then uses its own 5 seconds. With rendering on top, it passes the 10 second scrape_timeout the stuck-work page suggests. Prometheus then records up == 0 for that target exactly when the queue gauges matter most. With a healthy database, sampling takes milliseconds and nothing happens.
Possible fixes: let concurrent scrapes share one in-flight sample (the Adapter job host's sample cache does this), or start the deadline before taking the lock and accept that contention can cut a sample short.
2. Evidence and Adapter offline checks stop when metricsListener.networkExposure is an ${ENV} expression
Products that check configuration offline differ in how far they go when networkExposure is written as an environment expression:
- BReg, Casework, Scheduling, Messaging, Documents, Coordinator, Render, OID4VCI and OID4VP substitute a stand-in and keep checking the rest of the file.
- Evidence and Adapter cannot decode the value. They warn that it was not checked and stop checking the remainder of the file, so other configuration mistakes go unreported until start-up.
Nothing is refused that another product accepts. The gap is check depth. Giving Evidence and Adapter the same stand-in would align them with the other products.
- Langage dominant
- Rust
- Étoiles
- 2
- Forks
- 0
- Merge moyen
- 9 h 48 min
- PR mergées (30 j)
- 151
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de registrystack/registry-stack
-
area:breg enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
registrystack/registry-stack#2765 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
registrystack/registry-stack#2761 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
registrystack/registry-stack#2743 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
registrystack/registry-stack#2706 ·
Les mainteneurs répondent en général sous 1 jour
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directoryOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
registrystack/registry-stack#2704 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de registrystack/registry-stack
Issues similaires
-
[Bug] 建议把黑白主题设置同步到启动页面Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
stackabletech/airflow-operator#898 ·
Les mainteneurs répondent en général sous 1 jour
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)Peut-être pris @zyl71 l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100