GKE Stackdriver 中 Dropwizard 指标的最新最佳实践

Latest best practices for Dropwizard metrics in GKE Stackdriver

我有一个从 GKE 容器提供 API 的 Dropwizard 应用程序。获取 Stackdriver 中可用的管理指标(即管理端口上的 /metrics)的最佳做法是什么?我希望它们应该出现在 google 云平台的 Monitoring -> Metrics Explorer 界面中。

我知道有两种方法可以将指标导入 Stackdriver;

  1. JMX - some have managed to do that; I've managed to dig up this tutorial how to monitor JVM's with JMX and Stackdriver 但无法验证它是否是一个有效的解决方案。

  2. OpenCensus - 对我来说,这似乎是更可行的解决方案,主要是因为更大的知识库和(恕我直言)更好的社区支持。主要是因为有一个关于 Dropwizard integration with StackDriver and creating exporters (you have to use custom metrics). And here's another tutorial how to export Dropwizard metrics into Stackdriver.

  3. 的文档