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

Offen
#1,018 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@anth-volk arbeitet bereits daran.

Seit 06.11.2026.

  • #1019 von @anth-volk — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
fastapi, python

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
Python
Sterne
1
Forks
1
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
89

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PolicyEngine/policyengine-sim-api

Alle Issues in PolicyEngine/policyengine-sim-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.