Goal / Objetivo
EN: Add a small script that reads the structured conversation logs and prints
usage stats (conversations, turns, unique chats, errors, median turn time) over a
date range. Useful for observability without external tooling.
ES: Añadir un script que lea los logs estructurados de conversación e imprima
estadísticas de uso (conversaciones, turnos, chats únicos, errores, tiempo medio
por turno) en un rango de fechas. Útil para observabilidad sin herramientas
externas.
Context / Contexto
The bot already emits one JSON line per event to stdout/logs via
src/infrastructure/observability/conversation-logger.ts (each line is
prefixed with a date, then {"t":"conv", ...}). This task is a read-only
consumer of those lines.
Acceptance / Aceptación
- A
scripts/stats.ts (run with tsx) that takes a log file and prints a summary.
- Ignores/parses the date prefix correctly.
- A tiny test with a sample log fixture.
Good first issue — pure parsing, no external services.
Goal / Objetivo
EN: Add a small script that reads the structured conversation logs and prints
usage stats (conversations, turns, unique chats, errors, median turn time) over a
date range. Useful for observability without external tooling.
ES: Añadir un script que lea los logs estructurados de conversación e imprima
estadísticas de uso (conversaciones, turnos, chats únicos, errores, tiempo medio
por turno) en un rango de fechas. Útil para observabilidad sin herramientas
externas.
Context / Contexto
The bot already emits one JSON line per event to stdout/logs via
src/infrastructure/observability/conversation-logger.ts(each line isprefixed with a date, then
{"t":"conv", ...}). This task is a read-onlyconsumer of those lines.
Acceptance / Aceptación
scripts/stats.ts(run withtsx) that takes a log file and prints a summary.Good first issue — pure parsing, no external services.