简体   繁体   English

在Netflix伺服中制定分钟速率指标

[英]Making a Minute Rate Metric in Netflix Servo

I want to convert the StepCounter from doing the rates based on seconds to rate per minute (we have a monitor that runs every minute). 我想将StepCounter从基于秒的速率转换为每分钟速率(我们有一台每分钟运行一次的监视器)。

When I try to switch them polling from 1 per second to once every 60 seconds, it will, instead, take the increment value and divide it by 60 and create an rate per second. 当我尝试将轮询从每秒1次切换到每60秒一次时,它将采用增量值并将其除以60并创建每秒速率。

Anyone have an idea of how to expose a JMX value via Netflix Servo package to do a 60s metric instead? 任何人都知道如何通过Netflix Servo软件包公开JMX值来代替60s指标? There's CounterToRateMetricTransform but there are no examples on how to convert a Counter metric to a Rate. 有CounterToRateMetricTransform,但没有关于如何将Counter度量转换为Rate的示例。

StepCounter is an individual metric, but CounterToRateMetricTransform is applied to a MetricObserver, and returns a new observer that observes all counters transformed as rates StepCounter是一个单独的度量标准,但CounterToRateMetricTransform应用于MetricObserver,并返回一个新的观察者,该观察者观察转换为率的所有计数器

eg to create an observer that observes counters as rates and add it to a pollrunnable task 例如,创建一个观察者,将计数器视为速率并将其添加到可轮询的任务中

MetricObserver observer = new CloudWatchMetricObserver(...) // existing observer
MetricObserver transformedObserver = new CounterToRateMetricTransform(observer, 60, TimeUnit.SECONDS);
PollRunnable task = new PollRunnable(..., Immutable.listOf(transformedObserver));

Unfortunately this transform also returns a rate per second (see CounterToRateMetricTransform.computeRate) 不幸的是,此变换还返回每秒的速率(请参阅CounterToRateMetricTransform.computeRate)

There's no way to get a per minute rate through the existing library as far as I can see, you'd need to either implement your own metric (like StepCounter) or your own transform on an observer (like CounterToRateMetricTransform) depending on your use case. 就我所见,你无法通过现有的库获得每分钟的速率,你需要实现自己的度量(如StepCounter)或你自己的观察者转换(如CounterToRateMetricTransform),具体取决于你的用例。

The best approach is probably just to take the per second rate and multiply it by 60 in your monitoring system rather than changing the reporting 最好的方法可能只是采用每秒速率并在监控系统中乘以60而不是更改报告

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

相关问题 为Netflix Servo中的指标提供自定义名称 - Providing custom names for for Metrics in Netflix Servo Kafka JMX度量标准中的邮件当前速率 - Kafka JMX Metric Current Rate of Messages In 如何在Spring Cloud Netflix Zuul上配置简单的速率限制? - How to configure simple rate limiting on Spring Cloud Netflix Zuul? 使用 yammer 指标计时器获得一分钟的费率 - getting a one minute rate using yammer metrics timer Spring 云 - Redis 速率限制 - 不适用于每分钟的请求 - Spring Cloud - Redis Rate Limiting - Not working for request per minute Spring Cloud Netflix Zuul。 SQLSyntaxErrorException:表'rate'不存在 - Spring Cloud Netflix Zuul. SQLSyntaxErrorException: Table 'rate' doesn't exist 使GWT JSNI代码符合Checkstyle的TrailingComment指标 - Making GWT JSNI code legal to Checkstyle's TrailingComment metric 如何在速率限制器中处理 1 秒内 10 次调用和 1 分钟内不超过 50 次调用的情况 - How to handle the case like 10 calls in 1 sec and not more than 50 calls in 1 minute in rate limiter 使用BitmapFactory.decodeByteArray制作动画时帧速率不均匀 - uneven frame rate when making animation using BitmapFactory.decodeByteArray 将Netflix Zuul与Netflix Hystrix结合使用 - Combining Netflix Zuul with Netflix Hystrix
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM