Log to Metrics

Paste structured log lines — NDJSON, logfmt or CSV — and get the RED metrics back: how many requests per endpoint, what share of traffic, the throughput rate over the log's own time span, the error rate, and exact p50/p95/p99 latency. Group by any field or combination of fields, rank by the slowest, and export as a table, JSON, CSV or Prometheus exposition. Runs entirely in your browser, no upload, no sign-up.

Try:
Metrics

Logs into RED metrics

Paste structured log lines and aggregate them into the numbers you usually need for an incident review or a dashboard seed: request counts, traffic share, rate over the log's own time span, error counts, error percentage, and exact latency percentiles. The tool reads NDJSON (one JSON object per line), logfmt key=value records, and CSV/TSV blocks with a header row. It runs locally in the browser; nothing is uploaded.

Worked example

Input NDJSON:

{"ts":"2024-05-06T07:00:00Z","route":"/api/users","status":200,"duration_ms":37}
{"ts":"2024-05-06T07:00:20Z","route":"/api/users","status":500,"duration_ms":412}
{"ts":"2024-05-06T07:00:40Z","route":"/api/users","status":200,"duration_ms":58}
{"ts":"2024-05-06T07:01:00Z","route":"/api/orders","status":200,"duration_ms":120}

Set Group by fields to route, Numeric field to duration_ms, and Error field to status. The output shows one row per route with count, percent, a rate column, errors, error_%, min, avg, p50, p95, p99, max, and sum. Sort by p_top when you want the slowest endpoints first; sort by errors when you want the noisiest groups first.

Options that matter

Limits and edge cases

FAQ

What log formats can I paste?

Use NDJSON with one JSON object per line, logfmt records such as route=/api status=500 dur=42ms, or a CSV/TSV table with a header row. JSON arrays are not the intended input here; split them to one object per line first.

How is the rate calculated?

The tool reads the earliest and latest parseable timestamps in the batch and divides each group's count by that span. It is a batch rate over the log window you pasted, not a moving average. Set Timestamp field to none if the input has no timestamps.

Are the percentiles approximate?

No. Every parsed numeric value is kept, sorted, and reduced exactly. The linear method interpolates between neighbouring values; nearest uses nearest-rank and always returns a value that occurred in the log.

What counts as an error?

Only rows whose Error field matches one of the rules. Blank rules use the built-in set: 5*, error, err, fatal, critical, crit, panic, emerg, and alert. You can also write numeric comparisons such as >=500 or prefixes such as 4*.

Is my log data uploaded?

No. The parser and aggregator are compiled to WebAssembly and run in your browser tab. Logs often contain user IDs, hostnames, URLs, and tokens, so the page is designed for local-only processing.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool log-to-metrics '{"ts":"2024-05-06T07:00:00Z","route":"/api/users","status":200,"duration_ms":37}'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/log-to-metrics/?data=%7B%22ts%22%3A%222024-05-06T07%3A00%3A00Z%22%2C%22route%22%3A%22%2Fapi%2Fusers%22%2C%22status%22%3A200%2C%22duration_ms%22%3A37%7D&format=auto&group_by=route&value_field=duration_ms&percentiles=50%2C95%2C99&percentile_method=linear&time_field=auto-detect%2C%20or%20none&rate_unit=auto&error_field=status&error_values=5%2A%2C%20%3E%3D500%2C%20error%2C%20fatal&limit=20&other=true&sort=count&output=table&metric_prefix=log

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.