Skip to main content
The HyperProbe Java Agent is a zero-touch JVM Instrumentation agent. By attaching the JAR at startup via the standard -javaagent flag, it intercepts and transforms application bytecode on-the-fly—requiring zero code changes, zero annotation wrappers, and zero compilation modifications.

Technical Prerequisites

  • Runtime: Java 17 or later (compatible with Oracle HotSpot, OpenJDK, Corretto, Temurin).
  • Metadata: Active git commit SHA (mandatory for resolving bytecode offsets to local lines).
  • Agent Jar: The hyperprobe-agent.jar artifact. You can view and download all releases from Maven Central (Sonatype).

Downloading the Agent

Before attaching the agent, download the hyperprobe-agent.jar file. You can fetch it directly using curl or wget (be sure to replace <LATEST_VERSION> with the current version from Maven Central):
curl
wget

Installation & Deployment

Attach the agent at startup using the standard -javaagent flag. Set the required environment variables before starting your application.
Use environment variables for service, broker, and capture configuration. JVM system properties do not replace these settings. Custom trace ID hooks also support the system properties listed in the configuration reference.

Deployment Templates

It is best practice to download the agent jar during build-time and bake the Git commit into the final image:
Dockerfile
Build the image in your pipeline by passing the active commit:

🛠️ Build-Tool & Framework Setup

Attach the JVM agent inside your development environment to test probes locally before deploying.
Add the agent args to your standard Spring Boot run tasks inside build.gradle.kts:
build.gradle.kts

Configuration and environment variables

The following example lists all supported runtime environment variables. Required values are examples; optional numeric and redaction settings show their defaults.

Core settings

  • GIT_COMMIT, HYPERPROBE_SERVICE_ID, HYPERPROBE_ENVIRONMENT, and HYPERPROBE_BROKER_URL must be nonblank. The agent does not start if GIT_COMMIT is unknown. Java does not read HYPERPROBE_COMMIT_SHA.
  • HYPERPROBE_BROKER_URL accepts an HTTP(S) URL or a raw gRPC target such as localhost:50051. Do not include a trailing slash or query string. HTTPS enables TLS; HTTP and raw targets use plaintext gRPC.
  • HYPERPROBE_DISABLED disables startup only when set to YES (case-insensitive). true and 1 do not disable the agent.

Capture and redaction

Use positive integers for numeric limits. Missing or invalid integer values fall back to defaults. HYPERPROBE_REDACT_KEYS and HYPERPROBE_REDACT_VALUES accept comma-separated, case-insensitive regular expressions. Key patterns match field names and redact their values; value patterns redact matching portions of strings. A nonempty key list replaces the default list, so include the defaults when adding custom patterns. An empty value does not clear the default key rules. These capture and redaction settings provide startup defaults. Broker configuration can update them, and individual snapshot probes can override numeric capture limits.
Java does not expose environment variables for queue size, RPC timeout, event-loop lag, or pause budgets. Options such as HYPERPROBE_MAX_QUEUE_SIZE and HYPERPROBE_MAX_LAG_MS from other SDKs do not apply.

Logging and trace ID hooks

DEBUG accepts comma- or space-separated namespaces, such as hyperprobe*. It enables debug output without changing normal info, warning, or error logging. For custom trace IDs, set HYPERPROBE_TRACE_ID_CLASS to a class with a public static, zero-argument method. HYPERPROBE_TRACE_ID_METHOD defaults to getTraceId. Without a custom class, the agent looks for com.hyperprobe.hook.TraceIdHook.getTraceId(). You can also use -Dhyperprobe.traceid.class=... and -Dhyperprobe.traceid.method=...; these JVM properties take precedence over the corresponding environment variables.

Memory Safety Shields

Because bytecode injection could theoretically impact Heap health on heavy memory spikes, the Java Agent includes an active Memory Guardrail:
  • Yellow Threshold (Free Memory < 15%): Logs a warning and paces serialization buffers.
  • Red Threshold (Free Memory < 5%): Instantly uninstalls and suspends all in-memory probes to shield your JVM from Out-Of-Memory (OOM) failures.
  • Auto-Recovery: Resumes instrumentation automatically once GC recovers memory health and active cooldown cycles end.