.net Azure AppInsight -我的自定义属性在哪里?

92vpleto  于 2023-11-20  发布在  .NET
关注(0)|答案(1)|浏览(163)

我正在使用OpenTelemetry,并试图向当前Span添加一个自定义属性,我可以看到属性(user.name,user.role)作为跟踪的一部分显示:

  1. // This is a sample trace coming from console exporter
  2. Activity.TraceId: 1be70cf887cbde79d34d55e79642a9ee
  3. Activity.SpanId: 4a40500a30985ff2
  4. // Yada yada
  5. Activity.Tags:
  6. net.host.name: localhost
  7. net.host.port: 7253
  8. // The next 2 are my custom attributes
  9. user.name: Ahamat, Farid
  10. user.role: Guest, Officer
  11. http.status_code: 200
  12. Resource associated with Activity:
  13. // Yada yada

字符串
但是我找不到如何在Azure App Insight中查看此自定义属性。有人知道吗?
这里必须强调的是,我使用的是OpenTelemarket,我不是使用AppInsight SDK。

tyky79it

tyky79it1#

  • 使用Azure Application Insight。自定义属性和查询应用程序Insights中的自定义数据
  • 代码取自参考MSDOC

这是我添加自定义属性的方法。


的数据

  • 通过请求查询找到的自定义属性数量


  • 也可以在请求端到端transaction详细信息时在Transaction搜索中找到


展开查看全部

相关问题