我有许多 ASP.NETCore 应用程序和一个 Azure Application Insight 资源。我希望从所有应用程序中收集数据,并能够区分哪些信息来自哪个应用程序。
我在配置 ApplicationInsightTelemetry 时没有看到任何选项来设置应用程序 ID 或类似的内容。有没有办法告诉 Application Insight 信息来自哪个应用程序?
我的示例配置:
builder.Services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions()
{
ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;",
})
最佳答案
您要查找的属性是云角色名称
和云角色实例
。 Application Insights SDK 和代理将尝试自动设置这些设置,但您也可以覆盖它们。可以找到一些进一步的阅读 here.
关于azure - ASP.NET Core - 配置 Application Insight 以与许多应用程序一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69374580/