Records written during a gateway request carry the route <unmatched>

Aperta
#1,018 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@anth-volk ci sta già lavorando.

Dal 6/11/2026.

  • #1019 di @anth-volk — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
fastapi, python

Direzione di ricerca

Read the dependency declarations and uv.lock files in the six packages listed in the issue, then inspect the gateway and entrypoint tests. Update the observability requirement and relock each affected package. Done when every lock holds version 3.0.6 and tests confirm the matched route on the recorded exception and backend response event.

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

Descrizione

Problem

Every record the gateway writes while a FastAPI endpoint runs (from record_exception, event or log) carries http.route = <unmatched>, not the route template such as /jobs/{job_id}. The entrypoint's records have the same problem. The daily telemetry error report therefore groups gateway exceptions under <unmatched>; see PolicyEngine/policyengine-api#4218 (a ValueError group whose most frequent route is <unmatched>).

Cause

policyengine-observability 3.0.4's FastAPI middleware begins the request before FastAPI matches the route, and records written during the endpoint copy the route stored at that moment. PolicyEngine/policyengine-observability#40 fixed this in 3.0.5 (released 2026-10-27): the runtime now reads the matched route each time it writes a record. Every uv.lock on main still locks 3.0.4, and every pyproject.toml allows >=3.0.4,<4.

Fix

Require policyengine-observability 3.0.6 (the latest) in every package that depends on it, and relock every lock that holds it:

  • libs/policyengine-simulation-observability
  • libs/policyengine-simulation-contract (lock only)
  • libs/policyengine-stage12-persistence (lock only)
  • projects/policyengine-simulation-entry
  • projects/policyengine-simulation-executor
  • projects/policyengine-simulation-gateway

3.0.6 changes nothing else the services use: its only change after 3.0.5 is a newer certifi in the observability repository's own uv.lock, which does not affect the package's requirements.

Done when

  • Every lock holds policyengine-observability 3.0.6.
  • A gateway test shows that an exception recorded while GET /jobs/{job_id} runs carries http.route = /jobs/{job_id}, and an entrypoint test shows the same for its backend response event.
Lingua principale
Python
Stelle
1
Fork
1
Merge medio
1g 23h
PR unite (30g)
89

Preparare l'ambiente

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 PolicyEngine/policyengine-sim-api

Tutte le issue di PolicyEngine/policyengine-sim-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.