【问题标题】:Rails is not sending custom metrics to NewRelicRails 没有向 NewRelic 发送自定义指标
【发布时间】:2017-03-17 23:58:56
【问题描述】:

我正在尝试将自定义指标发送到 NewRelic 见解,但不幸的是,它不适用于我当前正在向 New Relic 发送默认数据的 Rails 应用程序。

重现步骤

我刚刚登录了工作应用程序的控制台并运行了以下命令:

NewRelic::Agent.record_metric('/Custom/MyCategory/MyMetric', 5)

很遗憾,它从未出现在 Insights Data Explorer 中。

应用中的配置如下:

common: &default_settings
  license_key: <MY_KEY>
  app_name: my_app
  log_level: info

development:
  <<: *default_settings
  app_name: executive_alerts (development)
  monitor_mode: false

test:
  <<: *default_settings
  app_name: executive_alerts (test)
  monitor_mode: false

staging:
  <<: *default_settings
  app_name: executive_alerts (staging)

production:
  <<: *default_settings

谢谢!

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 sidekiq newrelic newrelic-platform


    【解决方案1】:

    来自 New Relic 代理的文档:

    从以下位置更改您的命令:

    NewRelic::Agent.record_metric('/Custom/MyCategory/MyMetric', 5)
    

    到:

    NewRelic::Agent.record_metric('Custom/MyCategory/MyMetric', 5)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多