Azure Spring Boot应用程序洞察心跳遥测 [英] Azure Spring Boot application insights heartbeat telemetry

查看:82
本文介绍了Azure Spring Boot应用程序洞察心跳遥测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的spring boot应用程序,我启用了以下maven依赖项:

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>

我希望与Azure Application Insight集成以监视我的Spring Boot应用程序.

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

我已在 application.properties 中启用了以下属性:

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

具有这些功能后,我的应用程序就会显示在Azure App Insight仪表板的 Application Map 中.我可以在服务上看到Http请求,例如/health端点由kubelet使用 livenessProbe 调用.

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.

我无法理解心跳.我已经启用了上述属性,但是我不知道在Azure应用洞察力中在何处可以找到此心跳信息.运行哪些查询来验证我的spring boot应用程序是否确实在发送心跳遥测.

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.

我在哪里以及如何在App Insights或Log Anaytics中确认心跳信息?

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

推荐答案

心跳数据存储在 customMetrics 的表中,其名称为 HeartbeatState ,因此您可以使用以下查询:

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"

这篇关于Azure Spring Boot应用程序洞察心跳遥测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆