Blog Post

Apps on Azure Blog
3 MIN READ

Send signals from Micronaut native image applications to Azure Monitor

Logico_jp's avatar
Logico_jp
Icon for Microsoft rankMicrosoft
Aug 15, 2025

The original post (Japanese) was written on 20 July 2025.

MicronautアプリケーションからAzure Monitorにlog/metric/traceを送信したい – Logico Inside

Query

One of my customers, using Micronaut to develop their applications, asked me about the following question.

We are currently creating microservices with Micronaut and orchestrating them on Azure (Azure Container Apps). We would like to ask about the following two points.

  • We found information on how to send logs and metrics to Azure Monitor in the Micronaut documentation and guides, but we need to know how to send traces.
  • Is it also available with GraalVM Native Image?

Their query is, in short, Spring Boot provides Spring Boot Starter and Quarkus provides Quarkus as dependencies, but does Micronaut do the same?

Spring Boot starter

Quarkus Opentelemetry Exporter for Microsoft Azure

Monitor your Spring Boot native image application on Azure - Microsoft for Java Developers

Monitor your Quarkus native application on Azure
https://devblogs.microsoft.com/java/monitor-your-quarkus-native-application-on-azure/

Which method can be used?

When sending data such as metrics, traces, and logs about how well Micronaut is working to Azure Monitor (Application Insights or Log Analytics Workspace), we can use the following methods.

1) Use Java agents.It’s simple, but in some cases, it takes a long time to start up. And you can’t create a native image of it right now (as of July 20, 2025).
2) Create a FAT jar which dependencies are bound.Indeed, dependencies such as io.micronaut.micrometer:micronaut-micrometer-registry-azure-monitor and io.micronaut.azure:micronaut-azure-logging are bound to a JAR for creating a fat JAR, but there were no dependencies related to tracing.
3) Enable Azure Monitor Agent in Azure Container Environment to send data using the OpenTelemetry protocol (OTLP).This is specific to Azure Container Apps. it is simple because it works with any application type. However, metrics cannot be sent, as the document below says. [1]

[1] The following document and posts are related.

Collect and read OpenTelemetry data in Azure Container Apps
Observe Quarkus Apps with Azure Application Insights using OpenTelemetry | Microsoft Community Hub

The situation has been changed

But things have changed a bit for 2. In Micronaut 4.9.0, a dependency named azure-tracing (io.micronaut.azure:micronaut-azure-tracing) has been added to send traces to Application Insights. The dependency, micronaut-azure-tracing, is backed by Azure Monitor OpenTelemetry SDK Autoconfigure Distro instead of Azure Monitor agent, so this makes it compatible with Native Images. We no longer have to stop creating Native Images just to use trace functionality.

Azure Monitor OpenTelemetry SDK Autoconfigure Distro for Application Insights in Java applications client library for Java

It is important to remember some key points when sending Metric, Trace, and Log from Micronaut applications to Azure Monitor (Application Insights, Log Analytics Workspace). Each entry covers logs, traces, and metrics.

Send metrics from Micronaut native image applications to Azure Monitor | Microsoft Community Hub
Send traces from Micronaut native image applications to Azure Monitor | Microsoft Community Hub
Send logs from Micronaut native image applications to Azure Monitor | Microsoft Community Hub
Send signals from Micronaut applications to Azure Monitor through zero-code instrumentation | Microsoft Community Hub

Updated Aug 15, 2025
Version 6.0
No CommentsBe the first to comment