New Relic自定义指标不起作用

时间:2014-09-18 11:33:34

标签: python heroku newrelic

我正在使用New Relic,它运行正常。但是,当我尝试记录自定义指标时,它们不会显示在我创建的自定义信息中心中。它给出了警告,但我不确定如何解决它。

>>> import newrelic
>>> import newrelic.agent
>>> application = newrelic.agent.register_application()
2014-09-18 11:29:21,020 (2/MainThread) newrelic.core.agent INFO - New Relic Python Agent (2.4.0.4)
2014-09-18 11:29:21,021 (2/MainThread) newrelic.core.agent WARNING - The Python Agent is not enabled.
>>> newrelic.agent.record_custom_metric('Custom/Foo', 1.0, application)

1 个答案:

答案 0 :(得分:0)

您确定newrelic.ini文件是否正确?您可以使用heroku config:add NEW_RELIC_CONFIG_FILE=newrelic.ini

覆盖它

您需要确保newrelic代理从Heroku ENV VAR或通过ini文件获取许可证密钥

您应该尝试打印调试日志吗? heroku config:add NEW_RELIC_LOG_LEVEL=debug

NewRelic Heroku支持页面中的更多信息

相关问题