feat: accept, store and expose client diagnostics
- V11 client_logs table with per-user storage and retention/pruning - POST/GET/DELETE /logs with batch validation, rate limit and admin access - redact bearer tokens, Authorization headers and query/JSON secrets twice - add X-Request-Id to responses and include it in the server log pattern - report client error entries immediately in the server log - scripts/logs.sh for source-side retrieval and clearing - chart knobs CLIENT_LOG_RETENTION_DAYS and CLIENT_LOG_MAX_ROWS_PER_USER
This commit is contained in:
1 parent
91312faa1c
commit
44b75c4d4d
19 files changed
+981
-5
No files matched your search
@@ -750,7 +750,18 @@ Phases 1-8 are implemented in both repositories.
|
||||
additions in sync on unmetered networks, three at a time.
|
||||
- **Sleep timer** adds "Finish this track"; the full-screen player shows large
|
||||
artwork, transport, add-to-mood, queue and Up next.
|
||||
- Tests: 21 client tests; desktop, Android debug and Wasm compile.
|
||||
- **Diagnostics (V11)**: the client keeps 500 local info/warn/error entries and
|
||||
uploads up to 100 per minute to `POST /logs`, tagged with a random install id,
|
||||
platform, app version and per-process session id. Warnings and errors flush
|
||||
immediately so a crash keeps its cause. `Authorization`, `Bearer`, `token=`,
|
||||
`password=` and `arl=` values are redacted client-side and again server-side.
|
||||
Rows are per user, admins may read another user with `?user=`, and retention is
|
||||
`CLIENT_LOG_RETENTION_DAYS` (14) plus `CLIENT_LOG_MAX_ROWS_PER_USER` (20000).
|
||||
Uncaught exceptions are stored on Android and desktop and uploaded on the next
|
||||
launch. Every response carries `X-Request-Id`, which the client includes in
|
||||
server-error diagnostics so a report can be matched to the server log.
|
||||
- Tests: 26 client tests; desktop, Android debug and Wasm compile.
|
||||
|
||||
|
||||
### Known follow-ups
|
||||
|
||||
|
||||
Reference in new issue
Block a user