[19.0] endpoint_log: log endpoint calls in database with api_log
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the open question of which repository should host the module, since that decides the dependency direction. Then read fastapi_log in OCA/rest-framework as the model for the bridge, and look at how ir.http._dispatch receives the functools.partial registered by endpoint_route_handler in web-api. Done means a maintainer has chosen the location and a bridge module logs endpoint calls to api.log, with the migration tracked in OCA/rest-framework#616.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Endpoints currently leave no database record of the calls they receive. The log() helper available to code snippets writes manual messages to ir.logging, and nothing records the request and response themselves.
OCA/rest-framework already provides a generic model for this. api_log stores the URL, method, sanitised headers, body, status, timing and stack trace in api.log, and its api.log_collection.mixin adds a log switch and a Logs button to any model. fastapi_log is the bridge for fastapi.endpoint. The 19.0 migration is OCA/rest-framework#616.
I'd like to contribute an endpoint_log bridge for endpoint.endpoint, and I have a working version for 19.0:
endpoint.endpointinheritsapi.log_collection.mixin.- Logging hooks into
ir.http._dispatch, which receives thefunctools.partialthatendpoint_route_handlerregisters for each route. The endpoint record is resolved from it. The controller is not overridden, because routes call it by its dotted path. - Logs are written through a separate cursor, as in
fastapi_log, so the logs of failed calls are kept. api_logdepends only onweb, so the dependency stays light.
Question for maintainers: where should this module live?
- In web-api, depending on OCA/rest-framework for
api_log. - In rest-framework, next to
fastapi_log, depending on web-api forendpoint.
I'd lean towards web-api, since the module is about endpoints, but I'm happy to go either way.
@qrtl QT7417
Assisted-by: Claude Opus 5.5
- Lingua principale
- Python
- Stelle
- 49
- Fork
- 124
- Merge medio
- 4g 13h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OCA/web-api
-
Fast API Endpoints CacheApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
OCA/web-api#200 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Migration to version 20.0Apertahelp wanted no stale work in progress
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
OCA/web-api#120 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Migration to version 19.0Apertahelp wanted no stale work in progress
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
OCA/web-api#116 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Migration to version 18.0Apertahelp wanted no stale work in progress
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
plot_graph crashes when a mesh node has no m2m edgeForse già presa @tygvi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mllam/neural-lam#883 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement possible-duplicate
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
AOSSIE-Org/PictoPy#1715 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/auto-ontology#511 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ethereum/execution-specs#3996 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cpp-best-practices/project_validator#267 ·
I maintainer di solito rispondono entro 1 giorno