// or, enable/disable indentation explicitly
String indentStr = request.getQueryParameter(QUERY_PARAM_INDENT);
if (indentStr != null && indentStr.length() > 0) {
indent = Boolean.valueOf(indentStr.trim());
}
SerializedMetrics ser = _accessor.getMetrics(forceRefresh, full);
response = (ServletServiceResponse) response.ok()
.setContentTypeJson();
response.writeRaw(indent ? ser.getIndented() : ser.getRaw());
} catch (Exception e) {
String msg = "Failed to serialize Metrics: "+e;
LOG.warn(msg, e);
response = (ServletServiceResponse) response
.internalError(msg)