问题标签 [codahale-metrics]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - Java/Scala 指标 - Codahale - 集群/多节点和石墨报告器
在 Java 或 Scala 中使用 CodaHale Metrics 对集群环境进行编码时,向 Graphite 报告时有哪些问题?
如果我的应用程序有多个实例正在运行并创建不同的指标,Graphite 可以应对 - 即报告是累积的吗?
例如,如果我有 AppInstance A 和 B。如果 B 有一个仪表报告 1.2,另一个报告 1.3 - Graphite 的结果是什么?会是平均值吗?或者一个会覆盖另一个。
计数器是累积的吗?
计时器是累积的吗?
或者我应该以某种方式给每个实例一些标签来区分不同的 JVM 实例?
java - DropWizard 没有注册我的健康检查
在我的 DropWizard ( v0.7.0 ) 应用程序中,我有DummyHealthCheck
这样的:
然后在我的主要Application
实现中:
当我启动服务器时,它成功启动(没有异常/错误),但是我收到以下消息:
但是当我去时,http://localhost:8081/healthcheck
我看到:
- 这里发生了什么?如何注册我的健康检查?
- 此外,我已将 DropWizard 配置为在端口 8443 上使用 SSL(自签名);我已经验证这适用于我的正常端点。然而,令我惊讶的是,我的管理应用程序仍然通过 HTTP 暴露在 8081 上。我如何也为 HTTPS 配置它?
statistics - Java中每分钟的内存聚合事件
在我的 Java 守护程序应用程序中,我一直在读取来自 Kafka 主题的事件,该主题具有跨多个服务器的 100 多个分区(具有高级消费者组)。所以我需要聚合每个事件名称每分钟的事件计数并将其刷新到时间序列数据库。请注意,事件时间戳可能会出现故障,并且可能落后于消费者的当前时间。活动形式如下:
我必须在存储引擎之前进行预聚合(计数存储在任何时间序列数据库中)。
我会将以下聚合存储在存储引擎中(地板(时间戳)分钟):
我已经评估了代码 hale 指标和 statsD,(石墨 collectD(不是选项)但所有这些库的问题是它们实时聚合事件这是不可能的。所以我正在考虑使用 LRUConcurrentHashMap 作为数据结构来保存计数和每分钟刷新此映射到存储。我还必须保持 LRU 结构完整 1 小时左右,因为数据计数由于滞后或落后或无序而延迟。
您是否知道任何开源库可以做到这一点或任何更好的聚合和刷新方法?
scala - 如何从 Codahale 指标计时器中获取最后经过的时间?
我在我的 Scala 应用程序中使用 Codahale 指标,但似乎没有找到一种方法来获取定时操作的最后一个值。我可以得到平均值、中位数和百分位数——直方图中的所有好东西——但我只想知道最后一次操作花了多长时间!
查看快照中的条目零并将其从以纳秒为单位的值缩小到毫秒?这好像不太对...
我一定错过了明显的!
java - Codahale Metrics: using @Timed metrics annotation in plain Java
I am trying to add metrics to a plain Java application using codahale metrics. I'd like to use the @Timed annotation, but it is unclear to me which MetricRegistry it uses, or how to tell it which MetricRegistry to use. The application is a plain Java 8 application, built with Maven 3, no Spring, no Hibernate.
I can not find any documentation on how to implement @Timed in the dropwizard documentation: https://dropwizard.github.io/metrics/3.1.0/manual/
I've added these dependencies:
When I use a programatic call to Timer, I can get reports because I know which MetricsRegistry is used:
But when I use the much more elegant @Timed annotation, I have no idea which registry is used, and therefore I can not create a reporter, which means I can not get the metrics reported (I'm not even sure if this actually does anything):
Please advise on how to make the @Timed and other Metrics annotations work in a regular Java application.
Additional info: The reason I am finding this strange is that I have added the Lombok framework and the @Slf4j annotations do work. I added Lombok as a dependency in the maven pom.xml:
And I can use the @Sl4fj class annotation to add a logger to the class without cluttering up the member variables:
So if that's possible by just adding a dependency, I reckon I am just missing a dependency or configuration to get the codahale @Timed annotation work, as described above.
(by the way, check out Lombok, it will make your life easier: http://projectlombok.org/ )
java - 如何在 Spring Boot 应用程序中配置 HikariCP 和 Dropwizard/Coda-Hale 指标
阅读HikariCP wiki 上有关如何启用 Dropwizard 指标的说明,它说只需在or中配置一个MetricsRegistry
实例。HikariConfig
HikariDatasource
问题是,在 Spring Boot 中,所有配置都由自动配置处理,所以我根本没有手动配置 HikariCP 池。
有关如何执行此操作的任何说明?我是否必须通过定义自己的 bean 并在@Configuration
文件中设置所有设置来完全覆盖自动配置?
hibernate - 如何在 Spring Boot 应用程序中为 ehCache 配置 Dropwizard/CodaHale 指标?
所以这是我的问题。我的 Spring Boot 应用程序使用 Hibernate/JPA 和 ehCache 进行二级缓存。我想用 Dropwizard/Coda-Hale 指标来检测 ehCache,但我不确定该怎么做。如果我手动创建 Cache 实例,那很简单。您只需使用此处所示的装饰器。但由于它是 Spring/Hibernate,我无法控制缓存。任何想法我将如何进行设置?
python - 用 Python 监控 Kafka
我正在采用 Kafka 并试图了解如何监控它(例如,它是否耗尽了用于日志存储的内存)。我看到它使用 Yammer Metrics 并通过 JMX 公开它们——这显然对 Java 领域的人们有意义。
有没有可以构建的 HTTP API?或者真的是任何一种相对结构化的输出?
java - Codahale 米简单移动平均线
我正在使用 java codahale 指标库。我正在使用仪表。仪表自动生成 m1_rate、m5_rate 和 m15_rate,但这些速率是指数加权的。
有没有办法生成简单的移动平均线(没有指数加权)?
java - java度量聚合计数器
我开始使用指标,在这种情况下,我遇到了关于计数器可视化的“问题”:
这样,我有两个条目:
在 JMX 控制台中也是如此,如下所示:
那么,有没有办法获得如下指标:
因为我有很多计数器,我想把它们都放在一个条目中。
谢谢你。