Logging: Reduce INFO log noise
I maintainer di solito rispondono entro 1 giorno
@vprashrex ci sta già lavorando.
Dal 10/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the current behavior
The backend ships every INFO log to Sentry Logs. Over 7 days the kaapi-production project received about 335k INFO logs. A large share is routine per-request or per-task chatter that is never read and adds cost and noise when debugging.
Unique logger.info call sites in the codebase (excluding tests and migrations), by module:
| Module | Files | info | warning | error/exception |
|---|---|---|---|---|
| Knowledge base (collections, documents) | 31 | 59 | 34 | 34 |
| Assessment (API-client + submissions) | 11 | 21 | 17 | 14 |
| LLM call, chain, config & version | 29 | 53 | 105 | 50 |
| Evals 1.0 only (batch, Langfuse, embeddings) | 8 | 42 | 31 | 22 |
| Evals 2.0 only (judge, iteration loop) | 14 | 4 | 9 | 6 |
| Evals shared by 1.0 + 2.0 (core, cron, fast, dataset) | 21 | 47 | 22 | 21 |
| Onboarding (credentials, project, org, user-project) | 12 | 25 | 11 | 9 |
| Analytics (analytics + daily stats) | 5 | 0 | 1 | 0 |
Whole app: 558 logger.info call sites.
Actual production INFO volume in Sentry, 7 days, by module:
| Module | INFO logs | Main loggers |
|---|---|---|
| LLM call / chain | ~77,800 | services.llm.jobs 50.7k, crud.llm 16.9k, OpenAI provider 6.5k, Google AI Studio provider 3.7k |
| Evals (almost all shared code) | ~15,000 | crud.evaluations.cron_utils 13.4k, crud.evaluations.core 0.6k, services.evaluations.evaluation 0.5k |
| Assessment (API-client + submissions) | ~6,500 | crud.assessment.api 4.1k, services.assessment.api.batch 1.4k, callbacks / submission / submission_store 0.3k each |
| Knowledge base | ~1,500 | collection_job, crud.rag.open_ai, create_collection |
| Onboarding | negligible | |
| Analytics | 0 |
Cross-cutting loggers outside these modules, also worth reviewing:
| Logger | INFO logs | What it is |
|---|---|---|
http_request_logger |
86.7k | one access line per request |
app.celery.celery_app |
18.5k | [pool] status before and after every task |
app.api.routes.cron |
10.8k | cron polling every 5 minutes |
celery.worker.strategy |
10.4k | Celery "task received" |
app.celery.tasks.job_execution |
9.2k | task wrapper |
app.utils |
8.6k | mostly callback success lines |
app.celery.utils |
8.4k | enqueue lines |
app.core.langfuse.langfuse |
8.2k | tracing client |
Describe the enhancement you'd like
Go module by module (one PR per module) and for each INFO call site:
- Keep it if it marks a state change someone would search for (job created, job finished, provider called, callback sent).
- Downgrade to DEBUG if it narrates internal steps of a single request or task.
- Remove it if it duplicates another log, a span or a metric (for example per-task pool status, per-request access lines already covered by HTTP metrics and spans).
Suggested order by volume: LLM call/chain, cross-cutting Celery/cron loggers, Evals, Assessment, Knowledge base, Onboarding.
Why is this enhancement needed?
Lower Sentry Logs volume and cost, and faster debugging because the remaining INFO lines are the ones that matter.
Additional context
- Assessment scope is the API-client BATCH path and submissions only (
api/routes/assessment/api.py,services/assessment/api/,crud/assessment/api.py,crud/assessment/submission.py,services/assessment/submission.py). The legacy RUN pipeline (cron poller, UI routes,services/assessment/{service,stages,tasks}.py,crud/assessment/{cron,processing}.py) is outdated and out of scope. - Out of scope here but found while measuring: 46k
uvicorn.accesslogs inkaapi-productioncome from kaapi-guardrails development containers using the production DSN (health-check lines). That is a guardrails configuration fix, not a log cleanup. - Counts are from 2026-10-10; re-measure in Sentry Logs (group by
logger.name, filterseverity:info) before and after each module.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 11
- Merge medio
- 3g 11h
- PR unite (30g)
- 8
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un 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 ProjectTech4DevAI/kaapi-backend
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ProjectTech4DevAI/kaapi-backend#889 ·
I maintainer di solito rispondono entro 1 giorno
-
Evaluation: Improve guardrails awarenessForse già presa @AkhileshNegi l’ha presa 16 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
ProjectTech4DevAI/kaapi-backend#1246 ·
I maintainer di solito rispondono entro 1 giorno
-
Sentry Integration: Dynamic release taggingForse già presa @vprashrex l’ha presa 3 giorni fa. Apertaenhancement parent
ProjectTech4DevAI/kaapi-backend#1242 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Sentry Integration: Track staging commitsForse già presa @vprashrex l’ha presa 3 giorni fa. Apertaenhancement
ProjectTech4DevAI/kaapi-backend#1241 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Sentry release tracking for production (git sha + deploy markers)Forse già presa @vprashrex l’ha presa 3 giorni fa. Apertaenhancement
ProjectTech4DevAI/kaapi-backend#1240 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ProjectTech4DevAI/kaapi-backend
Issue simili
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkForse già presa @rodricksz4h5 l’ha presa oggi. Apertaarea/streaming comp/gateway P2 type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#138245 ·
I maintainer di solito rispondono entro 1 giorno
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
correction metadata
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 68/100
acl-org/acl-anthology#10378 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom nameForse già presa @12YYCCYY16 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prowler-cloud/prowler#13033 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
graygarbage/HermesKey#23 ·