简体   繁体   English

使用Dropwizard应用程序中的指标来测量活动(HTTP)连接的总数

[英]Measuring total number of active (HTTP) connections with Metrics in Dropwizard application

I have a Dropwizard application I am working with where I need to be able to monitor for active HTTP connections. 我有一个Dropwizard应用程序,正在使用该应用程序,该应用程序需要能够监视活动的HTTP连接。 I know Metrics provides classes for Instrumenting Jetty, and of interest to me is measuring total number of active connections....however the javadoc doesn't help me much, and I can't find any examples of how this specific functionality is implemented. 我知道Metrics提供了用于Instrumentation Jetty的类,而我感兴趣的是测量活动连接的总数。...但是javadoc对我没有多大帮助,并且我找不到有关如何实现此特定功能的任何示例。 Does anyone have any examples they can share? 有没有人可以分享任何例子?

I'm not sure what your exact use-case is but if you just need to be able to see active connections I think the simplest solutions are just using monitoring solutions like JMX, Datadog, New Relic, or Appdynamics. 我不确定您的确切用例是什么,但是如果您只需要能够看到活动的连接,我认为最简单的解决方案就是使用监视解决方案,例如JMX,Datadog,New Relic或Appdynamics。 If you need it in the code I think you'd need to manually implement something. 如果您在代码中需要它,我认为您需要手动实现一些功能。 I'd recommend StatsD or Redis is that's the path you go down. 我建议您使用StatsD或Redis就是这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM