Skip to main content

apppack-stats

Live response-time stats from streamed AppPack web logs.

apppack-stats shells out to apppack logs --raw --follow for the app you name, parses the JSON request lines, and renders a live Textual data table grouped by (method, normalized path). Click any column header to re-sort by it; click again to flip the direction.

Slowest endpoints — 1842/1903 lines parsed, 47s elapsed
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━┓
┃ Method ┃ Path                          ┃ Count ┃ Avg ms ┃ p95 ms ┃ Max ms ┃ Err ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━┩
│ GET    │ /reports/<id>/export          │     7 │   1842 │   2210 │   2480 │     │
│ POST   │ /api/v1/orders                │    23 │    412 │    711 │    980 │   2 │
│ GET    │ /dashboard                    │    91 │    188 │    320 │    640 │     │
└────────┴───────────────────────────────┴───────┴────────┴────────┴────────┴─────┘

Usage

No install required — run it straight from PyPI with uv:

uvx apppack-stats <appname>

Press q (or Ctrl+C) to stop.

Keys

Key Action
Click column header Sort by that column (click again to reverse)
n Toggle URL normalization on/off
q Quit

The AppPack CLI must be on your PATH and authenticated against the account that owns the app.

Options

Flag Default Notes
--refresh SEC 1.0 Seconds between redraws
--start DUR 5m How far back to seed history (30m, 2h, 1d, …)
--prefix STRING none AppPack log-group prefix filter — see note below
--no-normalize off Group by raw path instead of normalizing IDs
-o, --output PATH none On exit, write the final stats to PATH as CSV (- for stdout). Rows are sorted by whichever column was active in the UI when you quit.

The table fills the terminal and scrolls when there are more rows than fit.

A note on --prefix

apppack logs --prefix filters on AppPack's underlying CloudWatch log-group names, which don't always begin with the service name shown in the rendered (web/web/<task>) label. Different AppPack apps use different log-group naming conventions, so a fixed default like web silently drops everything for some apps. By default apppack-stats passes no prefix and lets the parser filter — only access-log JSON lines (those with method, path, status, response_time_us) are counted; everything else is skipped.

URL normalization

By default, paths are normalized so that /orders/12345 and /orders/67890 share a row as /orders/<id>. UUIDs become /<uuid>, long hex hashes become /<hash>. Pass --no-normalize to keep raw paths.

Adding support for another log shape

Access-log shapes live in src/apppack_stats/extractors.py. Append a new LogShape(...) to the SHAPES list — pick a time_field key that doesn't collide with existing ones, set time_unit to "us", "ms", or "s", and the parser will pick it up automatically.

Release files for apppack-stats 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apppack-stats 0.6.0
File Size Uploaded
apppack_stats-0.6.0.tar.gz 19.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apppack-stats 0.6.0
File Interpreter ABI Platform
apppack_stats-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.6 kB

Release files / apppack_stats-0.6.0.tar.gz

Download URL apppack_stats-0.6.0.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
de3eb8f50b77c7bc11f78c5823306bc2f00ce7bcc785afe2afd3bd7f854ec169
BLAKE2b-256 checksum
How to use checksums
71f9ea64f47456daed5ca567aa4824bfbaf2dcd2d1e515d70398ca5cdef092ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / apppack_stats-0.6.0-py3-none-any.whl

Download URL apppack_stats-0.6.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d015330de9d4a898171eb2a34589eadf91a3e60d8d42fb396a9af9f38de4461f
BLAKE2b-256 checksum
How to use checksums
f6ab4a5d5f26714f31c88e3ae853729905f28b69baf8a5c3c210b8507e10135b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page