gpt4 book ai didi

java - 通过我的应用程序访问 newrelic API

转载 作者:行者123 更新时间:2023-12-02 07:58:55 25 4
gpt4 key购买 nike

。我使用 Newrelic 作为 java 代理。我在提示符中使用命令“java -jar newrelic.jar install”安装 newrelic.yml 文件。运行时,它显示消息“INSTALL SUCCESSFUL”和一些其他信息。我还在运行 run.bat 文件中找到了 newrelic.yml 设置。但是当将端口运行为 "localhost:8080/newrelic"时,我无法在浏览器中看到 newrelic API。我在端口 8080 启动了我的服务器。

newrelic diectory.My newrelic_agent.log 中的日志文件夹包含以下行...,

Feb 8, 2012 05:49:07 PM NewRelic INFO: Writing to New Relic log file: D:\work\software\jboss-6.0.0.Final\newrelic\logs\newrelic_agent.log
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configured to connect to New Relic at collector.newrelic.com:80
Feb 8, 2012 05:49:09 PM NewRelic INFO: Setting protocol to "http"
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configuration file is D:\work\software\jboss-6.0.0.Final\newrelic\.\newrelic.yml
Feb 8, 2012 05:49:09 PM NewRelic WARN: The apdex_t setting is obsolete and is ignored! Set the apdex_t value for an application in New Relic UI
Feb 8, 2012 05:49:09 PM NewRelic INFO: New Relic Agent v2.3.0 has started
Feb 8, 2012 05:49:09 PM NewRelic INFO: Java version: 1.6.0_12
Feb 8, 2012 05:49:30 PM NewRelic INFO: JVM is shutting down
Feb 8, 2012 05:49:30 PM NewRelic INFO: New Relic Agent has shutdown

我确定尚未在浏览器中启动 newrelic API。它显示错误“HTTP 404 请求资源/k12/newrelic 不可用。我正在使用 j.d.k 1.6请帮助我..?

最佳答案

New Relic Ruby 代理有一个开发者模式,位于您尝试访问的/newrelic 路径处,但 Java 代理没有。开发者模式将为您提供应用程序发出的每个单独 Web 请求的详细跟踪,这类似于普通 New Relic 产品对事务跟踪所做的操作。

要使用 New Relic 并报告性能数据,您似乎已正确配置所有内容。您应该能够登录https://rpm.newrelic.com并查看您的应用正在做什么。

您提到“newrelic API”,但我不确定您到底在寻找什么。有一个API for the Java agent允许您配置代理。还有一个New Relic HTTP REST API这将让您检索应用程序报告的数据。

关于java - 通过我的应用程序访问 newrelic API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9206437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com