Skip to content

Move metrics to Prometheus client 1.x, upgrade common-utils to 5.0, and cut 3.5.0 - #130

Merged
pambrose merged 1 commit into
masterfrom
release-3.5.0
Sep 27, 2026
Merged

pambrose merged 1 commit into
masterfrom
release-3.5.0

Conversation

@pambrose

Copy link
Copy Markdown
Contributor

Summary

Cuts 3.5.0 (release date 2026-09-27): a monitoring and maintenance release.

  • Prometheus Java client 1.x. common-utils 5 and prometheus-proxy 4.2 require it, and the metrics endpoint now serves the 1.x PrometheusRegistry, so anything still registered in the 0.x CollectorRegistry compiles, runs, and is never scraped. The JVM collectors from Export JVM metrics and capture a heap dump on OOM #129 now use JvmMetrics.builder().register(). All 30 recording sites move from labels(...) to labelValues(...).
  • JVM metrics carry 1.x names: jvm_memory_used_bytes and jvm_classes_currently_loaded, not the 0.x names most published dashboards use. JvmMetricsTest asserts against the registry that is actually served.
  • FileSystemSource.file() path fix. Since common-utils 4.x it resolves against pathPrefix itself, so Challenge prepending it too doubled the prefix: invisible for "./", fatal for "../" (the Python test content).
  • Docs site builds with zensical alone. zensical.toml used Material's material.extensions.emoji path, which zensical only remaps in YAML configs, so uv run zensical build failed locally. CI masked it by also installing mkdocs-material; the config now names zensical.extensions.emoji and the workflow installs zensical alone.
  • Dependencies: Gradle 9.7.1 → 9.8.0 · Kotlin 2.4.10 → 2.4.20 · common-utils 3.2.2 → 5.0.0 · prometheus-proxy 4.0.1 → 4.2.0 · Prometheus Java client 0.16.0 → 1.9.0 · Flyway 13.7.0 → 13.8.0 · kotlinter 5.6.0 → 5.7.0 · buildconfig 6.1.1 → 6.1.2 · zensical 0.0.63 → 0.0.65
  • Docs: 3.5.0 entries in CHANGELOG.md, RELEASE_NOTES.md, and the website release notes; README.md, llms.txt, CLAUDE.md, and the server docs updated for JVM metrics, heap-dump reporting, local-run dumps, the Prometheus 1.x registry rule, and the zensical extension naming.

Breaking change

The public Metrics properties are now Prometheus 1.x types, which is source-breaking for anything that records to them from outside the library (labels(...) → labelValues(...)). readingbat-site does not use these APIs.

Test plan

  • ./gradlew test lintKotlinMain lintKotlinTest detekt: 381 tests, 0 failures, 6 skipped; lint and detekt clean
  • Docs site builds with uv run zensical build --clean (no mkdocs-material) and in an isolated zensical-only env matching CI; icon shortcodes render
  • After deploy: startup log reports heap dumps enabled; :8083/metrics exposes jvm_memory_used_bytes

🤖 Generated with Claude Code

…nd cut 3.5.0

common-utils 5 and prometheus-proxy 4.2 moved to the Prometheus Java client
1.x, and common-utils' MetricsService now serves
PrometheusRegistry.defaultRegistry. A collector left in the old 0.x
CollectorRegistry still compiles and runs but is never scraped -- which is
what would have happened to the JVM collectors added in #129 had
DefaultExports.initialize() been kept. They are now registered with
JvmMetrics.builder().register(), the 30 recording sites move from
labels(...) to labelValues(...), and server_start_time_seconds is set
explicitly because 1.x dropped setToCurrentTime(). JvmMetricsTest now
asserts against the registry that is actually served, using the 1.x metric
names (jvm_memory_used_bytes, jvm_classes_currently_loaded).

The public Metrics properties are now 1.x types, which is source-breaking
for anything that records to them from outside the library.

Since common-utils 4.x, FileSystemSource.file(path) resolves against
pathPrefix itself, so Challenge's call -- which prepended pathPrefix as
well -- doubled it on the upgrade. Invisible for a "./" root, fatal for
"../", where the Python test content lives. Paths are now relative to the
source root.

The docs site did not build from the project's own uv environment:
zensical.toml named the emoji extension by its Material for MkDocs path,
and zensical remaps material.extensions only in YAML configs. CI masked it
by also installing mkdocs-material; the config now names
zensical.extensions.emoji and the workflow installs zensical alone.

Also fixes an unresolvable KDoc link on Endpoints.STATIC_PATH; bumps Gradle
9.8.0, Kotlin 2.4.20, Flyway 13.8.0, kotlinter 5.7.0, buildconfig 6.1.2 and
the website's Python deps; and documents the release (3.5.0, 2026-09-27)
across CHANGELOG, RELEASE_NOTES, README, llms.txt, CLAUDE.md and the docs
site.

381 tests, 0 failures, 6 skipped; lint and detekt clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pambrose
pambrose merged commit 78f8012 into master Sep 27, 2026
5 checks passed
@pambrose
pambrose deleted the release-3.5.0 branch September 27, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant