svc_logs (log_id, line) holds application log lines in key=value form, for example:
level=INFO svc=checkout latency_ms=120 msg="ok"
- •Keys can come in any order, and any key can be missing.
- •A value is either bare (it runs to the next space) or in double quotes. A quoted value can contain spaces,
= and text that looks like other keys — that text is part of the value, not a key. - •A key only starts at the beginning of the line or after a space, so
subsvc= is a different key from svc=. - •Quotes are always balanced and never escaped.
Report, per service (the svc key):
- •
lines — log lines - •
errors — lines whose level is ERROR, in any letter case - •
error_pct — errors as a percentage of lines, rounded to 1 decimal place - •
avg_latency_ms — the average latency_ms of the lines that have one, rounded to 1 decimal place (NULL if none do)
Lines with no svc are reported under svc = 'unknown'.
Columns: svc, lines, errors, error_pct, avg_latency_ms. Sort by svc.