是否可以从第 3 方应用程序执行对 Azure App Insight 的查询

Is it possible to execute query to Azure App Insight from 3rd party appliation

我们正在使用 Azure Application Insights 作为应用程序的主要存储 events/exceptions/etc。

目标是在 .net 6 上构建自定义报告系统。该应用程序应连接到 Azure Application Insights,执行一些查询,然后以特定方式处理检索到的事件。

有很多信息,如何将事件写入 Application Insight,但仅仅是关于从 3rd 方应用程序查询的信息。 有人能以正确的方式指出我吗? 预先感谢。

您可以为此使用 REST API

...a set of REST APIs created to make data collected by Application Insights easily available. Using these APIs you can build new visualizations of your application's data...

There are several APIs...:

Metrics: ...to retrieve metric data such as the number of exceptions each hour for the last day ... [via] a metric name, a timespan, time intervals, the type of aggregation (sum, average, minimum or maximum) and the property over which to segment the data...

Events: ...allows users rich capabilities to access their event data using OData ... supports $filter, $orderBy, $search, $apply, $top, $skip and $format...

Query: ...designed to enable users API access to the same data using the same queries as they do with Application Insights Analytics...