简体   繁体   English

收集您的应用程序的指标

[英]Collecting metrics for your application

Curious how people are integrating sending of metrics to graphite. 很好奇人们如何集成向石墨发送指标。 It appears most are using a client (many available on statsd github) that sends to statsd which sends on to carbon. 似乎大多数人正在使用发送到statsd并发送到carbon的客户端(许多在statsd github上可用)。 My question is do you think it is ok to include this "cross cutting concern" as such directly into your code. 我的问题是,您认为可以将这种“跨领域关注点”直接包含在您的代码中吗? What I am seeing is my application code has went from been nice and clean to now not so nice and clean with code to gather metrics intertwined with my business code. 我所看到的是我的应用程序代码已经从原来的漂亮到现在变得不那么漂亮了,而使用代码来收集与我的业务代码交织在一起的指标。 Any thoughts? 有什么想法吗?

I do think that it's fine to include code to send business metrics in your application code. 我确实认为在应用程序代码中包含发送业务指标的代码很好。 As @tomer-peled says in his comment, there is a close analogy with logging. 就像@ tomer-peled在评论中所说的那样,与日志记录非常相似。

However I understand your reluctance to scatter this stuff around and possibly obfuscate the code. 但是,我知道您不愿意将这些内容分散在各处,并且可能使代码变得晦涩难懂。 My approach in situations like this is to accept a certain amount of mess to begin with, then as more examples emerge I try to identify emergent structures which point to abstractions that would clean things up a bit. 在这种情况下,我的方法是先接受一定数量的混乱,然后,随着更多示例的出现,我尝试确定出现结构,这些结构指向抽象,这些抽象将使事情变得有些混乱。

暂无
暂无

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

相关问题 在Java中收集应用程序度量标准(可选.Net) - Collecting Application Metrics in Java (optionally .Net) Prometheus 不收集 pod 指标 - Prometheus is not collecting pod metrics 从多个电报收集指标到普罗米修斯 - Collecting metrics from multiple telegraf to prometheus 想要用于存储和跟踪应用程序指标的体系结构 - Want architecture for storage and tracking of application metrics Kubernetes 中的示例容器化应用程序无法在 Prometheus 中显示为用于抓取指标的目标 - A sample containerized application in Kubernetes unable to be shown as targets in Prometheus for scraping metrics 无法在 Prometheus Operator 中获取 spring 引导应用程序的指标 - Unable the get the metrics of spring boot application in Prometheus Operator 对自动捕获应用程序外部连接的方法有什么建议吗? - Any suggestions for an automated way to capture your application's external connections? 应用程序指标会发生什么变化,例如在普罗米修斯普罗米修斯的抓取间隔中未被抓取的进程使用的 CPU - what happens to application metrics e.g. CPU used by process that are not scraped in scrape interval prometheus JMeter 和 Sitescope 监控器 - 是否可以将指标传递给 SiteScope,以便实时监控应用程序? - JMeter and Sitescope Monitors - Is it possible to pass metrics to SiteScope so an application can be monitored in real time? 您在生产Java应用程序中使用JMX监视什么? - What do you monitor with JMX in your production Java application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM