azure - 请求表 Azure Application Insights 哪个操作属于哪个资源?

标签 azure azure-application-insights azure-monitoring azure-monitor azure-monitor-workbooks

我正在 Azure Monitor 中使用工作簿并尝试创建仪表板。

我的所有资源数据进入 1 个 Application Insights 资源。 我在此 Azure 帐户中创建了存储、Azure Functions、VPN、Web App 等资源。 我正在使用一项订阅。

我正在尝试在请求表上运行查询

enter image description here

我想为特定的 WebApp 创建仪表板,即“ABC”

或者

我想为资源 WebApp、Azure Function、Storage 创建 1 个仪表板,其名称包含“XYZ” requests 表不包含 resourcesid 列。我应该使用哪个其他表来获取资源类型和资源 id、名称

最佳答案

我在登录常见应用洞察资源时遇到了同样的问题。

据我所知,所有不同的日志应用程序之间没有共同的属性,我可以用来确定遥测源。

我最终的结果是使用遥测初始值设定项向所有遥测添加自定义属性(可以在启动期间添加,例如在 Azure Functions 以及 AppService 中添加)。对于Storage,不知道是否也可以这样做。

    // C# sample for the initializer
    public class ComponentNameTelemetryInitializer : ITelemetryInitializer
    {
        private readonly string _ComponentName;

        public ComponentNameTelemetryInitializer(string assemblyName)
        {
            _ComponentName = assemblyName;
        }

        public void Initialize(ITelemetry telemetry)
        {
            if (telemetry is ISupportProperties propTelemetry)
            {
                propTelemetry.Properties["ComponentName"] = _ComponentName;
            }
        }
    }

这样我就可以过滤自定义维度 ComponentName 的日志,并获取来自特定应用程序的所有条目。

关于azure - 请求表 Azure Application Insights 哪个操作属于哪个资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72239271/

相关文章:

c# - JSON 序列化速度慢

c# - ITelemetry.InstrumentationKey 为空

azure - 如何在 Azure 服务总线诊断日志上记录订阅自动删除事件?

azure - Azure Monitor 'Response time' 和 AppInsights 'Duration' 之间有什么区别?

azure - 如何使用 Team Foundation Build 2015 部署到特定的 Azure 虚拟目录

python - Azure Functions 中的凭据、传递一个凭据还是根据需要调用?

azure - Azure App Insights 中存在太多(已恢复)异常

Azure Function - 以编程方式检查其完成情况

azure - Azure 上的多个网站/角色,临时服务器的影响

azure - 如何从 Azure API 管理登录到 App Insights 'send-request'