This page consolidates the public surface of Dirac: artefacts to declare, exported Java modules, supported MicroProfile Metrics 5.1.1 annotations, and the mp.metrics.* keys recognised by the implementation.
Maven artefacts
groupId |
artifactId |
Role |
|---|---|---|
|
|
Local repackage of |
|
|
Re-exposition of the MP Metrics spec and stable Dirac SPI ( |
|
|
APT annotation processor (CG-05): generates |
|
|
Pure-Java implementations: |
|
|
CDI interceptors ( |
|
|
JAX-RS resource |
|
|
JMH benchmarks vs Micrometer / SmallRye Metrics. Not for production. |
|
|
Standalone and vidocq-mps-integrated examples. Not for production. |
|
|
Official MP Metrics 5.1.1 TCK runner — in-reactor, gated behind the |
All artefacts share the version 0.4.0-SNAPSHOT.
Java modules
| Module | Contents |
|---|---|
|
MP Metrics 5.1.1 repackage with an explicit |
|
Exports |
|
APT processor module — generates the |
|
|
|
|
|
|
io.vidocq.dirac.internal.* is never exported to application code: any direct dependency signals a regression.
Bean archives NEW
dirac-cdi-vauban and dirac-rest are explicit bean archives: each ships a META-INF/beans.xml with bean-discovery-mode="annotated". A container that does not scan implicit archives, such as Weld SE by default, therefore still discovers the @Counted and @Timed interceptors, the MetricRegistry and gauge beans, and the GET /metrics resource. Under Vauban nothing changes: annotated is already how CDI Lite discovers beans. DiracExtension is listed in META-INF/services as well as in the module descriptor, so it also runs on a class path.
Other CDI containers NEW
Dirac does not need Vauban. The jars run unchanged under another CDI container, and two integration-test modules, grouped under dirac-it-other-containers, prove it on every build (dirac#23):
| Module | What it runs |
|---|---|
|
Weld SE 6.0 (CDI 4.1), class path, no Vauban: |
|
A WAR bundling |
Neither module is published. What they found, now fixed:
-
vauban-apiis a runtime dependency ofdirac-cdi-vaubananddirac-rest, under any container. The Vauban build weaves aprotectedconstructor takingio.vidocq.vauban.api.ProxyLinkinto each normal-scoped bean (MetricRegistryProducerBean,GaugeRegistrationBean,MetricsResource); a container that cannot load that type cannot load the class, and Weld drops the bean with an INFO message (WELD-000119) before failing the deployment (DRC-004).vauban-apiholds API types only (13 KB): no Vauban code runs outside Vauban. Its Jakarta CDI dependencies are excluded, so the container’s own CDI API stays the only one. -
Each container has its own discovered metrics — see Internals (DRC-005).
-
The container’s own classes are skipped — on Open Liberty, the extension visits the server’s beans too, and reported each one it could not load as an error, which failed the deployment (DRC-006).
|
Deploying on an application server
|
Supported MicroProfile Metrics annotations
| Annotation | Effect | Status |
|---|---|---|
|
Interceptor increments a |
✅ |
|
Interceptor measures duration via |
✅ |
|
Resolved once by |
✅ |
|
Injection qualifier to pick among the three |
✅ |
|
Extra metadata on an injection point (name, description, unit, tags). |
✅ |
|
Annotation absent from the |
⚠️ Not exposed by the API |
Configuration keys
Dirac reads its configuration without any MicroProfile Config dependency: DistributionConfig resolves each key from System.getProperty(…) first, then scans every META-INF/microprofile-config.properties visible on the classpath. Exactly three keys are recognised:
| Key | Effect |
|---|---|
|
Global percentile list ( |
|
Fixed buckets for |
|
Fixed buckets for |
|
|
|
The MP Metrics 5.1 spec defines no path option (no equivalent of |
MetricUnits types
org.eclipse.microprofile.metrics.MetricUnits enumerates the canonical units:
-
Durations —
NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS -
Sizes —
BITS,KILOBITS,MEGABITS,BYTES,KILOBYTES,MEGABYTES,GIGABYTES -
Generic —
NONE,PERCENT,PER_SECOND
Dirac performs no automatic conversion: the unit is exposed as declared. Prometheus convention: express durations as SECONDS, sizes as BYTES.
GET /metrics endpoint
Route |
|
Verbs |
|
Types |
|
Source |
|
Status |
|
Implementation |
|
Injectable MetricRegistry
@Inject
MetricRegistry application; // APPLICATION
@Inject @RegistryScope(scope = MetricRegistry.BASE_SCOPE)
MetricRegistry base;
@Inject @RegistryScope(scope = MetricRegistry.VENDOR_SCOPE)
MetricRegistry vendor;
Compatibility
-
Java 25 (LTS), Maven 3.9.16.
-
CDI 4.1 Lite (Vauban) or Lite-compatible — the standard
InterceptorandBuildCompatibleExtensionsuffice. Proven on Weld SE 6.0 and Open Liberty (CDI 4.0): see Other CDI containers NEW. -
JAX-RS 4.0 (Cassini) — only if
dirac-restis used. -
No MicroProfile Config integration: the
mp.metrics.distribution.*keys are read from system properties orMETA-INF/microprofile-config.propertiesdirectly. -
No Jakarta EE Full Profile dependency.