All Integrations
LanguagesMaven / Gradle dependency

Micronaut Integration

Instrument Micronaut applications with one compile-time dependency. AOT instrumentation with no runtime reflection, GraalVM native support, and HTTP client spans — minimal overhead.

Setup

How It Works

01

Add the Maven / Gradle Dependency

Add io.tigerops:micronaut-tigerops to your pom.xml or build.gradle. The library uses Micronaut AOT (ahead-of-time) compilation to inject instrumentation at build time, so no runtime reflection or byte-buddy agents are required.

02

Configure application.yml

Add tigerops.api-key, tigerops.service-name, and tigerops.environment to your application.yml or application.properties. Micronaut's environment-aware config resolution supports 12-factor style environment variable overrides automatically.

03

AOT Bean Processing at Compile Time

The Micronaut annotation processor detects @Controller, @Client, and @Transactional beans and generates interceptor bytecode at compile time. No runtime weaving, no proxies — instrumentation is plain Java method calls in the generated code.

04

Traces, HTTP Client Spans & JVM Metrics

Within seconds TigerOps receives Micronaut controller spans, HTTP client call spans with W3C header injection, transaction boundary traces, and JVM heap and GC metrics from your compile-time DI application.

Capabilities

What You Get Out of the Box

Compile-Time AOT Instrumentation

Micronaut TigerOps uses annotation processors to generate instrumentation code at build time. There are no runtime proxies, no reflection, and no byte-buddy agents. The resulting bytecode is GraalVM native-image friendly out of the box.

HTTP Server Controller Spans

@Controller method invocations become root spans with route pattern, HTTP method, response status, and latency. Error responses capture the exception type and message. Reactive controller methods using Reactor or RxJava are fully supported.

Micronaut HTTP Client Tracing

@Client interface methods create child spans for every outbound HTTP call. W3C traceparent headers are injected into requests. Client-side response status, target host, and round-trip latency are recorded as span attributes.

@Transactional Boundary Spans

Every @Transactional method boundary creates a span recording the transaction isolation level, propagation type, rollback-only status, and commit/rollback outcome. JDBC and Hibernate ORM query child spans are nested inside the transaction span.

Micronaut Data Query Tracing

Micronaut Data repository methods generate compile-time SQL that TigerOps captures as child spans with the repository method name, normalized SQL, execution time, and result count. Both JDBC and R2DBC repositories are instrumented.

GraalVM Native Image Support

All TigerOps instrumentation is generated at compile time with no runtime reflection. The library ships a reflect-config.json and resource-config.json for the GraalVM native-image agent so native builds succeed without additional configuration.

Configuration

Install & Initialize

One dependency. One YAML block. Full Micronaut observability.

build.gradle + application.yml
// build.gradle
dependencies {
    annotationProcessor "io.tigerops:micronaut-tigerops-processor:0.1.0"
    implementation      "io.tigerops:micronaut-tigerops:0.1.0"
}

# application.yml
tigerops:
  api-key:      ${TIGEROPS_API_KEY}
  service-name: my-micronaut-app
  environment:  production
  trace-data:   true
  trace-client: true
  slow-query-threshold-ms: 100

# Controller — auto-instrumented at compile time
import io.micronaut.http.annotation.*;
import io.tigerops.Traced;

@Controller("/orders")
public class OrderController {

    @Post
    @Traced("order.create")   // <-- optional custom name
    public HttpResponse<Order> create(@Body OrderRequest req) {
        // Inject tracer for manual attributes
        TigerOps.currentSpan()
            .setAttribute("order.items", req.items().size());

        Order order = orderService.create(req);
        return HttpResponse.created(order);
    }
}
FAQ

Common Questions

Which Micronaut versions are supported?

Micronaut Framework 3.x and 4.x are fully supported. Java 17 and 21 are the recommended JDK versions. Kotlin and Groovy controller annotations are supported via the respective Micronaut language extensions included in the tigerops annotation processor.

How does TigerOps handle Micronaut reactive controllers with Project Reactor?

Reactive Mono and Flux return types from @Controller methods are instrumented by subscribing a TigerOps Reactor operator that restores the trace context on each onNext, onError, and onComplete signal. The span covers the full reactive pipeline duration.

Can I use TigerOps with Micronaut Function for AWS Lambda?

Yes. Add the micronaut-tigerops-lambda dependency which adds a synchronous OTLP flush before each Lambda handler returns. Cold start initialization time is recorded as a span attribute on the first invocation per container.

Does TigerOps support Micronaut Security JWT filter traces?

Yes. The Micronaut Security filter is instrumented to record JWT token validation time, authentication result, and the principal name (hashed by default). Failed authentication events are recorded as span events with the rejection reason.

How do I add custom spans inside a @Singleton service?

Inject a TigerOps Tracer bean and call tracer.spanBuilder("operation.name").startSpan(). Alternatively, annotate any bean method with @Traced("operation.name") to generate a compile-time span wrapper without writing any manual span lifecycle code.

Get Started

Full Micronaut Observability with Zero Runtime Overhead

AOT controller traces, HTTP client spans, Micronaut Data queries, and GraalVM native support — compile-time instrumentation only.