【问题标题】:Azure Application Insights codeless agent does not show cloudRoleInstance and cloudRoleName in application mapAzure Application Insights 无代码代理不在应用程序映射中显示 cloudRoleInstance 和 cloudRoleName
【发布时间】:2020-12-16 19:22:12
【问题描述】:

我在我的 Java 应用程序上使用 Azure Application Insights,我在 JAR(Java 无代码代理 3.0.0)旁边添加了一个 ApplicationInsights.json 文件,但 roleName 和 roleInstance 没有推送到 Aplication Insights。

    {
        "instrumentationSettings": {
            "connectionString": "InstrumentationKey=XXX..XXX"
        },
        "preview": {
            "roleName": "MYROLE",
            "roleInstance": "myinstance"
        }
    }

当我转到 Azure 门户中的“日志”选项卡时,传入数据上的 roleInstance 字段仍设置为机器名称,并且 roleName 不在传入数据中。

可以读取 JSON 文件,因为它包含我的 Application Insights 资源的 InstrumentationKey。

【问题讨论】:

    标签: java azure azure-application-insights telemetry


    【解决方案1】:

    据此(https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config)“预览”应该是“instrumentationSettings”的一部分:

    {
      "instrumentationSettings": {
        "connectionString": "InstrumentationKey=00000000-0000-0000-0000-000000000000",
        "preview": {
          "roleName": "my cloud role name"
        }
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-02
      • 1970-01-01
      • 2022-01-11
      • 2021-07-03
      • 2020-06-13
      • 2016-01-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多