如何查看HTTP请求的来源?

How to view the origin of HTTP requests?

我公司的一个内部 HTTP 端点正在接收大量请求,但我们不知道它们来自哪里。如何追踪这些请求的来源?

更新: 我忘了提到我想使用 NewRelic 查看请求的来源。我也没有在我的生产环境中安装像 Fiddler 这样的调试工具的奢侈。

也许是 fiddler or postman 之类的工具。

New Relic does not track 标识符,如开箱即用的源 IP 地址。您必须在您的应用中实施自定义检测以跟踪这些标识符。

例如,您可以在 Insights 中 add a custom attribute to the Transaction or PageView event type that will track the source IP address, or you can record a custom event

如果您添加自定义属性,那么您应该能够使用 New Relic Insights 进行如下查询:

SELECT `source.ip.address` FROM Transaction

如果您添加自定义事件,那么您应该能够使用 New Relic Insights 进行如下查询:

SELECT * FROM YourCustomEventName

New Relic 的 custom instrumentation 将帮助您实现目标。