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

Đang mở
#1,018 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@anth-volk đang làm issue này rồi.

Từ ngày 6/11/2026.

  • #1019 của @anth-volk — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
fastapi, python
Lĩnh vực
backend, observability

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
1
Fork
1
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
89

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-sim-api

Tất cả issue của PolicyEngine/policyengine-sim-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.