Search code examples
google-kubernetes-enginedropwizardstackdrivergoogle-cloud-stackdriver

Latest best practices for Dropwizard metrics in GKE Stackdriver


I have a Dropwizard application serving APIs from a GKE container. What are the best practices for getting the admin metrics (i.e. /metrics on the admin port) available in Stackdriver? I expect they should show up in the google cloud platform's Monitoring -> Metrics Explorer interface.


Solution

  • There are two ways I know of to get you metrics into 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 but can't verify it's a valid solution.

    2. OpenCensus - for me it seems like more viable solution mainly due larger knowledgebase and (IMHO) better community support. Mainly because there's a documentation about 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.