java-rust-glowroot-agent 0.4.0
java-rust-glowroot-agent 0.4.0
0.4.0 gives every supported Spring web runtime the same bounded HTTP telemetry contract without
making the agent choose or add a web server.
What Users Get
- Add one starter to a Spring MVC application. The existing server is detected automatically.
- Tomcat uses a context Valve, Jetty uses a completion RequestLog, and Undertow uses an exchange
completion listener. All three cover sync, async, mapped status, exception,404, bounded route,
slow-request, and error telemetry. - WebFlux remains a separate small artifact and uses one bounded WebFilter.
- The WebFlux adapter now completes the application signal before it records the bounded telemetry
event. This removes response-critical callback work while preserving final status, normalized
route, asynchronous completion, and error accounting. - Non-web Spring Boot workers can use only
java-rust-glowroot-spring-runtime; no Servlet, MVC,
embedded-server, or WebFlux dependency is required. - The common Rust runtime still owns aggregation, protobuf encoding, reconnect, bounded queues, and
resource release on its isolated exporter thread. - Java request threads no longer read exception messages or walk stack traces. They hand a bounded
weak reference to Rust; the isolated exporter extracts optional error detail under the existing
trace-capacity limit and drops it safely if GC or backpressure wins. - No Tomcat, Jetty, Undertow, Reactor Netty, or Servlet engine is added by the agent. Server API
dependencies areprovidedandoptionalinside isolated adapter modules. - There is no per-server toggle. A supported server always receives its optimized adapter when
reactor.glowroot.enabled=trueandreactor.glowroot.spring.enabled=true.
Spring MVC Setup
<dependency>
<groupId>com.reactor</groupId>
<artifactId>java-rust-glowroot-spring-boot-starter</artifactId>
<version>0.4.0</version>
</dependency>Keep the application's normal Tomcat, Jetty, or Undertow selection. No agent-specific server
dependency or property is required.
| Runtime | Active adapter | Server engine added by agent |
|---|---|---|
| Spring MVC + Tomcat | tomcat-valve |
None |
| Spring MVC + Jetty | jetty-request-log |
None |
| Spring MVC + Undertow | undertow-completion-listener |
None |
WebFlux Setup
<dependency>
<groupId>com.reactor</groupId>
<artifactId>java-rust-glowroot-spring-webflux-adapter</artifactId>
<version>0.4.0</version>
</dependency>The application still supplies spring-boot-starter-webflux and selects its reactive server.
Non-Web Spring Boot Setup
Use the runtime-only artifact for a Kafka worker, scheduler, batch process, command-line application,
or database-only Spring Boot service:
<dependency>
<groupId>com.reactor</groupId>
<artifactId>java-rust-glowroot-spring-runtime</artifactId>
<version>0.4.0</version>
</dependency>spring.main.web-application-type=none
reactor.glowroot.enabled=true
reactor.glowroot.profile=jvm
reactor.glowroot.collector.address=http://glowroot-collector:8181
reactor.glowroot.agent.id=invoice-worker::pod-1
reactor.glowroot.application.name=invoice-workerThe umbrella Spring Boot starter also works, but the runtime-only artifact is the smallest classpath.
When enabled, Spring creates one process-scoped native runtime and one isolated Rust exporter thread.
When disabled, it creates no telemetry bean, loads no native library, and allocates no exporter state.
| Profile | Non-web data |
|---|---|
micro |
Process RSS, operating-system thread count, exporter/reconnect/drop health |
jvm |
micro plus heap, non-heap, memory pools, GC count, and GC time |
sql |
micro plus explicitly registered SQL duration, error, and row aggregates |
full |
JVM gauges, explicit SQL, and bounded error stacks |
diagnostic |
full plus authorized thread dump, heap histogram, and heap dump commands |
Kafka topics, scheduler jobs, batch steps, arbitrary Java methods, and JDBC calls are not woven or
discovered automatically. Process/JVM evidence is automatic. SQL timing uses an explicit reusable
NativeTelemetry.SqlStatement descriptor. The optional -javaagent bootstrap only maps early
properties; it does not replace the runtime dependency.
Validation
The release source includes an executable OpenJ9 compatibility gate for Tomcat, Jetty, Undertow,
and Reactor Netty. It verifies sync 200, async 200, 500, 404, native route registration,
selected-adapter identity, and a short zero-non-2xx load. A separate dependency gate inspects both
Maven runtime trees and executable BOOT-INF/lib contents and fails on any unselected server engine.
An executable WebApplicationType.NONE gate separately verifies native JVM/SQL telemetry without MVC
beans or web runtime dependencies.
Compatibility results are not a server-performance ranking. Production overhead must still be read
from same-server telemetry-off versus telemetry-on paired evidence.
Stable A/B Gate
The runtime was measured with Semeru OpenJ9 21 in randomized telemetry-off/on process pairs. Each
WebFlux cell ran for 60 s, so every candidate cell included at least one real exporter window. A
final exact-source confirmation repeated the most sensitive raw-JSON cell after fail-open hardening.
| Runtime and workload | Useful RPS delta | p99 delta | Process RSS delta | Non-2xx |
|---|---|---|---|---|
| Tomcat, small JSON, c256 | -1.91% |
+5.43% |
+2.23 MiB |
0 |
| WebFlux, small JSON, c64 | -1.22% |
-6.18% |
+2.11 MiB max |
0 |
| WebFlux, small JSON, c256 | +0.27% |
-7.58% |
+2.11 MiB max |
0 |
| WebFlux, raw JSON, c64, exact final source | +1.23% |
-5.97% |
+0.82 MiB |
0 |
| WebFlux, raw JSON, c256 | -0.40% |
-8.19% |
+2.11 MiB max |
0 |
All cells passed the release limits: useful RPS loss at most 2%, p99 regression at most 10%,
and process RSS growth at most 3 MiB. The full WebFlux matrix's maximum RSS delta was +2.11 MiB.
The standalone runtime still owns one exporter thread.
Windows may expose one additional operating-system socket helper in the process thread count; no
second agent worker or Java executor is created.
Compatibility
Use Rust-Java REST 4.5.5, REST ABI 29, and Glowroot ABI 3. The native telemetry ABI did
not change in this release. Do not copy native binaries between unrelated versions.