diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2018-11-05 11:21:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 11:21:28 +0100 |
commit | 5c8f10594f16e6ba5ccabdeeeae6d966e84c3da2 (patch) | |
tree | 8169ccdf24e2c651d80f84dd4f27809e2f0806ad | |
parent | 73ddc9ab02cad4f7a4cdc62ec369e593f797b453 (diff) | |
parent | e0033bdbb608f2c06766a4a8dde879fa09dc7902 (diff) |
Merge pull request #7565 from vespa-engine/gjoranv/add-newline
Gjoranv/add newline
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/jdisc/state/MetricsPacketsHandler.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/state/MetricsPacketsHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/state/MetricsPacketsHandler.java index 4859222d69a..1376b50dad9 100644 --- a/container-core/src/main/java/com/yahoo/container/jdisc/state/MetricsPacketsHandler.java +++ b/container-core/src/main/java/com/yahoo/container/jdisc/state/MetricsPacketsHandler.java @@ -27,9 +27,11 @@ import java.util.Map; import static com.yahoo.container.jdisc.state.StateHandler.getSnapshotPreprocessor; /** - * This handler outputs metrics in a json-like format. Each individual metric is a json object (packet), - * but there is no outer array or object that wraps the metrics packets. This handler is not set up by - * default, but can be added to the applications's services configuration. + * This handler outputs metrics in a json-like format, consisting of a series of metrics packets. + * Each packet is a json object but there is no outer array or object that wraps the packets. + * To reduce the amount of output, a packet contains all metrics that share the same set of dimensions. + * + * This handler is not set up by default, but can be added to the applications's services configuration. * * This handler is protocol agnostic, so it cannot discriminate between e.g. http request * methods (get/head/post etc.). @@ -87,7 +89,7 @@ public class MetricsPacketsHandler extends AbstractRequestHandler { private byte[] buildMetricOutput() { try { - String output = getStatusPacket() + getAllMetricsPackets(); + String output = getStatusPacket() + getAllMetricsPackets() + "\n"; return output.getBytes(StandardCharsets.UTF_8); } catch (JSONException e) { throw new RuntimeException("Bad JSON construction.", e); |