public static void toJsonl(List<MetricsPacket> metrics, OutputStream outputStream, boolean addStatus) throws IOException {
        JsonGenerator generator = factory.createGenerator(outputStream)
                .setPrettyPrinter(new MinimalPrettyPrinter("\n"));
        for (MetricsPacket metricsPacket : metrics) {
            toJson(metricsPacket, generator, addStatus);
        }
        generator.close();
    }
Converts the given json formatted string to a list of metrics packet builders.
Note that this method returns an empty list if an IOException occurs,
and logs a warning as a side effect.
metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/json/YamasJsonUtil.java