Skip to content

Commit 8c5b1cd

Browse files
lesnik512claude
andcommitted
docs(release): add 1.2.2 curated release notes
Notes for the Litestar Prometheus group_path=True default (PR #144). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b1617e2 commit 8c5b1cd

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

planning/releases/1.2.2.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# lite-bootstrap 1.2.2 — bound Litestar Prometheus path cardinality by default
2+
3+
**1.2.2 is a patch release framed as a bug fix, with one observable behavior change.** It flips the Litestar Prometheus `path`-label default from raw URLs to the route template, closing an unbounded-cardinality footgun that grew process memory without limit on parameterized routes.
4+
5+
## Bug fix
6+
7+
- **Litestar `prometheus_group_path` now defaults to `True`** (PR [#144](https://github.com/modern-python/lite-bootstrap/pull/144)). Litestar's own `PrometheusConfig` defaults `group_path=False`, so the `path` metric label recorded the raw request URL. Any route with path parameters then minted one time series per distinct value (`/users/1`, `/users/2`, …), growing the metric registry without bound — visible in production as steadily climbing memory. The new default binds the label to the route template (`/users/{id}`), so cardinality is bounded by the number of routes, not the number of distinct URLs.
8+
9+
The new `LitestarConfig.prometheus_group_path` field is merged as `{"group_path": <field>, **prometheus_additional_params}`, so `prometheus_additional_params["group_path"]` still overrides it without a keyword collision — the previously-documented workaround keeps working unchanged. FastAPI is unaffected: `prometheus-fastapi-instrumentator` already labels by route template.
10+
11+
## Behavior change
12+
13+
- **The Litestar `path` metric label now holds the route template instead of the raw URL.** Dashboards, alerts, or recording rules keyed on raw parameterized paths (`path="/users/1"`) will no longer match; they should key on the template (`path="/users/{id}"`). To restore the old raw-path behavior per application, set `prometheus_group_path=False` (or `prometheus_additional_params={"group_path": False}`).
14+
15+
## Backwards compatibility
16+
17+
Fully backward compatible with 1.2.1 at the API level — the new field is additive and defaulted. The only observable difference is the metric-label value described above. Configs already passing `group_path` via `prometheus_additional_params` are unaffected (the dict still wins).
18+
19+
## References
20+
21+
- PR [#144](https://github.com/modern-python/lite-bootstrap/pull/144)
22+
- Upstream issue proposing the same default flip / a warning in Litestar: [litestar-org/litestar#4891](https://github.com/litestar-org/litestar/issues/4891)

0 commit comments

Comments
 (0)