使用单个指标跟踪DataDog中的成功和失败

发布于 2025-02-03 11:18:22 字数 383 浏览 3 评论 0原文

当前,我们的代码库跟踪两个单独的指标,可以说abcsuccessabcfailure。我们始终每次将指标递增1个值。

是否有必要分开这些指标?或者,我们可以通过错误的值“递增”度量标准,而1获得成功,如果我们想要总失败计数,我们可以减去总和在总数的时间段?

我试图通过查看这两个sum:abcsuccess {*}。AS_COUNT() and count:abcsuccess {*} as_count(as_count()。由于我总是将值增加1个,我希望这些值相同,但是Count值显着更高(并且始终为每次切片10的增量?)

Currently our codebase tracks two separate metrics, lets say a.b.c.success and a.b.c.failure. We always increment the metric by a value of 1 each time.

Is it necessary to separate these metrics? Or can we "increment" the metric by a value of 0 for errors, and 1 for success, and if we wanted a total count of failures, we could subtract the sum in a time period from total count?

I tried to confirm this could work through the metric explorer by looking at graphs for both sum:a.b.c.success{*}.as_count() and count:a.b.c.success{*}.as_count(). Since I'm always incrementing the value by 1, I would expect these values to be the same but the count value is significantly higher (and always in increments of 10 per time slice?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文