Alluxio / Community

New Contributor Tasks for Alluxio
20 stars 38 forks source link

Beauty print metrics json in Alluxio web ui #606

Closed LuQQiu closed 3 years ago

LuQQiu commented 3 years ago

To get the full list of Alluxio master metrics, we visit localhost:19999/metrics/json To get the full list of Alluxio worker metrics, we visit localhost:30000/metrics/json However, the page is not quite readable since we https://github.com/Alluxio/alluxio/blob/3f73cf9d28903a90b023db3c92c6c08bd96b902a/core/server/common/src/main/java/alluxio/metrics/sink/MetricsServlet.java#L62

        String result = mObjectMapper.writeValueAsString(mMetricsRegistry);
        response.getWriter().println(result);

Can you beauty print the json or do other transformations to make the metrics more readable by human?

LuQQiu commented 3 years ago

https://github.com/Alluxio/alluxio/pull/13923