JVM Observability Platform GitHub

Spring Boot Integration

If you're building a Spring Boot application (3.2+), you don't need to use the -javaagent flag at all. Just add a single dependency and Argus starts automatically with your application.

Setup

// build.gradle.kts
implementation("io.argus:argus-spring-boot-starter:1.4.0")

When your Spring Boot application starts, Argus will:

  • Start the JFR streaming engine automatically
  • Launch the dashboard on port 9202
  • Register with Spring Boot Actuator at /actuator/health/argus
  • Export ~25 Micrometer metrics to your configured backend (Prometheus, Datadog, etc.)

Configuration via application.yml

argus:
  buffer-size: 131072
  server:
    port: 9202
  gc:
    enabled: true
  cpu:
    enabled: true
    interval-ms: 500
  allocation:
    enabled: true
    threshold: 524288

All properties have IDE autocomplete support. The defaults match the standard agent configuration.

Diagnostics-only mode (production-safe)

For production deployments where you don't want a daemon HTTP server listening on port 9202 or a JFR stream running 24/7, set argus.mode=diagnostics. You still get the analysis primitives as Spring beans plus actuator endpoints — without the runtime cost of the full mode.

argus:
  mode: diagnostics                # 'full' | 'diagnostics' | 'off'
  doctor:
    schedule:
      enabled: true                # optional: run doctor every interval
      interval-ms: 60000
management:
  endpoints:
    web:
      exposure:
        include: argus-doctor,argus-gc

Programmatic API beans

Three injectable services let application code run Argus analyses directly:

@Autowired DoctorService doctor;

@GetMapping("/admin/health/jvm")
public List<Finding> jvmHealth() {
    return doctor.diagnoseLocal();   // or doctor.diagnoseRemote(pid)
}
  • DoctorService — diagnoseLocal / diagnoseRemote(pid) / diagnose(snapshot)
  • GcLogAnalyzerService — analyze(Path) / analyze(List<GcEvent>)
  • GcScoreService — score(analysis [, gcAlgorithm]) / inferAlgorithm

All three are @ConditionalOnMissingBean so applications can override with custom implementations.

Actuator endpoints

GET /actuator/argus-doctor          # diagnose the local JVM
GET /actuator/argus-doctor/{pid}    # diagnose a remote JVM via jcmd
GET /actuator/argus-gc              # GC log analysis + score

Opt in via the standard management.endpoints.web.exposure.include gate. Responses are explicit Map<String, Object> shapes so the JSON contract is stable across Jackson versions.

Micrometer Metrics

When Micrometer is on the classpath (it is in most Spring Boot apps), Argus automatically registers ~25 JVM diagnostic metrics:

# Example Prometheus queries
argus_heap_used_bytes                    # Current heap usage
argus_gc_pause_time_max_seconds          # Worst GC pause
argus_cpu_jvm_user_ratio * 100           # JVM CPU %
argus_virtual_threads_active             # Active virtual threads
argus_allocation_rate_bytes_per_second   # Allocation pressure

Framework-agnostic: The argus-micrometer module works without Spring. If you're using Quarkus, Micronaut, or standalone Micrometer, add argus-micrometer directly and register the ArgusMeterBinder with your MeterRegistry.