0
votes

For my spring boot application, I have enabled the following maven dependency:

    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>applicationinsights-spring-boot-starter</artifactId>
        <version>${appinsight.version}</version>
    </dependency>

I am looking to integrate with Azure Application Insight to monitor my spring boot application.

I have enabled the following properties in application.properties:

spring.application.name=test
azure.application-insights.instrumentation-key=test_id
azure.application-insights.heart-beat.heart-beat-interval=60
azure.application-insights.heart-beat.enabled=true

Having these gets my application showing in Application Map in Azure App Insight dashboard. I can see Http requests on my service e.g. /health endpoint called by kubelet with livenessProbe.

I am having trouble understanding heartbeat. I have enable the properties as above but I don't understand where to find this heartbeat info in azure app insight. What queries to run to verify if my spring boot app is indeed sending heartbeat telemetry.

I did not write any code to send telemetry for heartbeat, just enable the properties as I assume you get this with the starter kit.

Where and how Can I confirm heartbeat info in App Insights or Log Anaytics?

1
In Application Insights -> logs, run the query customMetrics | where name == "HeartbeatState".Ivan Yang

1 Answers

0
votes

The heartbeat data is stored in the table of customMetrics and its name is HeartbeatState, so you can use the query below:

customMetrics | where name == "HeartbeatState"

enter image description here