请求表Azure应用程序洞察哪个操作属于哪个资源?

发布于 2025-01-28 15:55:16 字数 465 浏览 4 评论 0原文

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

我的所有资源数据都进入1个应用程序洞察力资源。 我有在此Azure帐户中创建的存储,Azure功能,VPN,Web应用等资源。 我正在使用的一项订阅。

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

”在此处输入映像说明“

我想为特定的webapp创建仪表板,即“ abc”,

或者

我想为资源WebApp,azure webapp,azure函数,存储的名称说明包含1个仪表板“ xyz” 请求表不包含ResourceD列。我应该使用哪个表来获取资源类型和资源ID,名称

I am using Workbook in Azure Monitor and trying to create a dashboard.

My All resources data goes into 1 Application Insights resource.
I have resources like storage, Azure Functions, VPN, Web App etc created in this azure account.
One subscription i am using.

I am trying to run query on requests table

enter image description here

I want to create dashboard for a particular WebApp say namely "ABC"

OR

I want to create 1 dashboard for resources WebApp, Azure Function, Storage say of name containing "XYZ"
requests table does not contain resourceid column. Which other Table i should use to get resource type and resource id, name

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇妻 2025-02-04 15:55:16

我在登录常见的应用Insights资源时也喜欢同样的问题。

从我所看到的,在所有不同的日志记录应用程序中都没有共同的属性,我本来可以用来确定遥测源。

我最终使用的是使用遥测初始化器向所有遥测添加自定义属性(可以在Azure函数中的启动期间添加,以及AppService)。对于存储,我不知道这是否也可以完成。

    // 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 的日志,然后从特定应用程序中获取所有条目。

I had like the same question while logging into a common app insights resource.

From what I saw, there was no common property across all the different logging applications, I could have been using to determine the telemetry-source.

What I ended up with was to add a custom property to all telemetry using a telemetry initializer (which can be added during the startup e.g. within Azure Functions, as well as AppService). For the Storage, I don't know whether this can be also done.

    // 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;
            }
        }
    }

That way I can just filter the log for the custom dimension ComponentName and I get all entries from a specific application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文