Skip to content

About

Bounded Rust-first telemetry for Rust-Java REST and Spring Boot MVC, exporting to Glowroot Central with minimal RSS and no bytecode weaving.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

119 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-Rust Glowroot Agent

English | Türkçe

Release CI Java

Bounded, low-RSS Glowroot Central telemetry powered by a Rust native exporter — no bytecode weaving.

Observe HTTP aggregates, slow/error traces, Spring @Scheduled jobs, Dubbo calls, and JVM gauges without adding Byte Buddy, ASM, Java gRPC, or Netty to your application.


Choose Your Integration

Runtime Dependency to Add Native Engine
Rust-Java REST (4.10.1) Built-in — no extra starter needed Uses framework librust_hyper
Spring Boot 3 (MVC) java-rust-glowroot-spring-boot-starter:0.7.1 Standalone native exporter
Spring Boot 3 (WebFlux) java-rust-glowroot-spring-webflux-adapter:0.7.1 Standalone native exporter
Spring Boot 3 (Non-Web / Scheduler) java-rust-glowroot-spring-runtime:0.7.1 Standalone native exporter

Quick Start (5 Minutes)

Option A: Rust-Java REST

Telemetry is built into rust-java-rest. Enable it in rust-spring.properties:

reactor.glowroot.enabled=true
reactor.glowroot.profile=micro
reactor.glowroot.collector.address=http://glowroot-central:8181
reactor.glowroot.agent.id=order-api::pod-1
reactor.glowroot.application.name=order-api

Option B: Spring Boot 3

  1. Add the starter to pom.xml:
<dependency>
  <groupId>com.reactor</groupId>
  <artifactId>java-rust-glowroot-spring-boot-starter</artifactId>
  <version>0.7.1</version>
</dependency>
  1. Enable it in application.yml:
reactor:
  glowroot:
    enabled: true
    profile: micro
    collector:
      address: http://glowroot-central:8181
    agent:
      id: billing-service::${HOSTNAME:local}
    application:
      name: billing-service

Observing Custom Background Operations

Wrap any batch job, Kafka listener, or custom workflow with NativeOperation (zero per-call allocation):

NativeOperation refresh = NativeOperation.register(
        NativeTelemetry.current(), "Background", "CustomerCache#refresh");

long started = refresh.start();
try {
    materializer.refresh();
    refresh.success(started);
} catch (RuntimeException | Error failure) {
    refresh.failure(started, failure);
    throw failure;
}

Spring @Scheduled jobs are observed automatically when reactor.glowroot.scheduler.enabled=true.


Tuning Guide & Runtime Profiles

Telemetry is disabled by default (reactor.glowroot.enabled=false). When enabled, pick the smallest profile that meets your needs:

Profile What It Collects Best For
micro Exact HTTP/operation counts, latency histograms, error counts, basic gauges Always-on production (1 CPU / 128 MiB)
jvm micro + extended JVM gauges Production memory monitoring
sql micro + bounded SQL statement aggregates (sql.capacity <= 32) DB-heavy services
full micro + JVM + SQL + bounded slow/error traces Staging or incident investigation
diagnostic full + CPU/allocation/contention thread stats Short-lived live troubleshooting

Switch Profiles Live (Without Restart)

Escalate temporarily during an incident, then restore to reclaim memory:

GlowrootTelemetry.switchTo(TelemetryProfile.FULL, Duration.ofSeconds(5));
// ... investigate ...
GlowrootTelemetry.restoreConfiguredProfile();

Recipe 1: Always-On Low-RSS Production (micro)

reactor.glowroot.enabled=true
reactor.glowroot.profile=micro
reactor.glowroot.export.interval-ms=60000
reactor.glowroot.trace.capacity=0
reactor.glowroot.max-routes=64
reactor.glowroot.max-export-bytes=65536

Recipe 2: Incident Investigation (full)

reactor.glowroot.enabled=true
reactor.glowroot.profile=full
reactor.glowroot.trace.slow-threshold-ms=250
reactor.glowroot.http.sample-rate=16
reactor.glowroot.trace.capacity=16
reactor.glowroot.sql.capacity=32
reactor.glowroot.error.trace.capacity=8

Documentation

About

Bounded Rust-first telemetry for Rust-Java REST and Spring Boot MVC, exporting to Glowroot Central with minimal RSS and no bytecode weaving.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages