【问题标题】:How to show value of log attribute in monitor with log.attribute.ATTRIBUTE如何使用 log.attribute.ATTRIBUTE 在监视器中显示日志属性的值
【发布时间】:2022-06-23 21:39:02
【问题描述】:

我在 Datadog 中创建了一个监视器。我想从 limitedSessionData.user.email 的日志 JSON 中提供的日志中提取电子邮件。

当我输入监视器时,下面的屏幕截图是出现的提示。但是我尝试了以下但没有工作:

  • "{{log.attributes.limitedSessionData.user.email}}" - email this guy asking if he needs help.
  • "{{log.attributes.[limitedSessionData.user.email]}}" - email this guy asking if he needs help.
  • "{{log.attributes[limitedSessionData.user.email]}}" - email this guy asking if he needs help.
  • "{{log.attributes[@limitedSessionData.user.email]}}" - email this guy asking if he needs help.

任何想法如何做到这一点?日志属性需要分面吗?

【问题讨论】:

    标签: datadog


    【解决方案1】:

    这行得通:

    "{{log.attributes.[params.body.fullName]}}" - email this guy
    

    【讨论】:

      猜你喜欢
      • 2021-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-28
      • 2016-01-13
      • 2018-01-01
      相关资源
      最近更新 更多