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

Ouverte
#1,018 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

@anth-volk y travaille déjà.

Depuis le 6/11/2026.

  • #1019 par @anth-volk — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
fastapi, python

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Python
Étoiles
1
Forks
1
Merge moyen
1 j 23 h
PR mergées (30 j)
89

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PolicyEngine/policyengine-sim-api

Toutes les issues de PolicyEngine/policyengine-sim-api

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.