erikvanoosten/metrics-scala
63.6
Adequate · 6 November 2026
1.9k
lines of production code
Scala
primary language
4
measurements over time
What this system is
This system is a Scala library that provides instrumentation and metrics collection capabilities for applications, with specific support for Akka and Pekko actor frameworks. It enables developers to track performance metrics such as message counts, processing times, and exceptions through stackable traits, while also offering high-resolution histogram data and health check registration. The library supports various metric types including counters, gauges, timers, and meters, and facilitates both pull-based and push-based metric reporting.
Features
Add Pekko actor metrics support
The \metrics-pekko\ module now provides stackable actor traits for instrumenting Apache Pekko actors, including \ActorInstrumentedLifeCycle\ to automatically unregister gauges on actor restart, \ReceiveCounterActor\ to count received messages, \ReceiveTimerActor\ to time message processing, and \ReceiveExceptionMeterActor\ to meter thrown exceptions. This change introduces new functionality for Pekko rather than modifying existing behavior, and includes comprehensive tests for these new metrics capabilities.
metrics-pekko · high confidence
Added HdrMetricBuilder for high-resolution metrics
Users can now create Histogram and Timer metrics backed by the HdrHistogram library via the new HdrMetricBuilder class in the nl.grons.metrics4.scala package. This builder allows for high-resolution latency and distribution tracking, with an option to configure reservoirs that either accumulate state indefinitely or reset on each snapshot, providing more accurate percentile data for performance monitoring.
metrics-scala-hdr · high confidence
New actor metrics traits for gauges, counters, timers, and exception meters
The metrics-akka module now includes new stackable actor traits that automatically instrument Akka actors. \ActorInstrumentedLifeCycle\ ensures gauges are unregistered before an actor restarts to prevent registry conflicts. \ReceiveCounterActor\, \ReceiveTimerActor\, and \ReceiveExceptionMeterActor\ provide stackable message handling that counts received messages, times message processing, and meters thrown exceptions, respectively. These traits allow developers to easily add metrics to actors by mixing them into actor classes, with default metric names based on the actor class and the specific metric type.
metrics-akka · high confidence
New push gauges and health check builder with fresh registry support
The library now supports push gauges, allowing users to explicitly set gauge values via \metrics.pushGauge\ or \metrics.pushGaugeWithTimeout\ rather than relying solely on lazy evaluation. A new \CheckedBuilder\ trait provides a \healthCheck\ method for registering health checks that accept various result types (Boolean, Try, Future, etc.), and \DefaultInstrumented\ and \FreshRegistries\ traits simplify registering metrics and health checks to shared or isolated registries.
metrics-scala/src/main · high confidence
Behavioural changes
Removal of legacy SBT build configuration
The legacy SBT build definition file (JmxUtils.scala) has been removed from the project. This file previously configured the project to publish source artifacts alongside class files and defined specific dependencies, including a snapshot version of ScalaTest. Its removal indicates a shift away from this specific build setup, likely as part of a migration to a newer build tool or configuration structure.
project/build · high confidence
Test coverage
Added unit tests for metrics-scala components
Added comprehensive unit tests for the metrics-scala library, covering the CheckedBuilder (health checks), Counter, Gauge, Histogram, Meter, Timer, and MetricName classes, as well as the InstrumentedBuilder, MetricBuilder (including push gauges), Implicits, DefaultInstrumented, and FreshRegistries traits.
metrics-scala/src/test · high confidence
Dependencies
Added Scala Steward configuration
The repository now includes a \.scala-steward.conf\ file that enables automatic dependency updates for Scala libraries via the Scala Steward bot.
(repo-wide) · high confidence
Updated build dependencies to latest stable versions
The build configuration has been updated to use the latest stable versions of key dependencies: Scala 3.3.7 and 2.13.18, Dropwizard metrics-core and metrics-healthchecks 4.2.38, HdrHistogram 2.2.2, Akka 2.5.31 and 2.6.20, and Apache Pekko 1.4.0. Test dependencies are also updated to ScalaTest 3.2.19, Mockito 5.21.0, and SLF4J Simple 2.0.17. The build now targets Java 11 by default and supports cross-compilation for Scala 2.11, 2.12, 2.13, and 3.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 63 → 64 (+0.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 98 → 98 (+0.0)
- Maturity 47 → 52 (+5.5)
- Readiness 71 → 70 (-1.0)
- Security 81 → 68 (-12.7)
- Performance 100 → 100 (+0.0)
Resolved (6)
- Off-boarding risk: anonymized user #1
- Outdated: com.typesafe.akka:akka-actor_2.13
- Outdated: io.dropwizard.metrics:metrics-core
- Outdated: io.dropwizard.metrics:metrics-healthchecks
- Outdated: nl.grons:metrics4-pekko_2.13
- Outdated: org.apache.pekko:pekko-actor_2.13
New (2)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
- Off-boarding risk: anonymized user #1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
erikvanoosten/metrics-scala was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 16e7c2af572a8c698a472cc310aca35c7ffda7ec — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.