Class YamasJsonUtil
java.lang.Object
ai.vespa.metricsproxy.metric.model.json.YamasJsonUtil
- Author:
- gjoranv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<MetricsPacket>appendOptionalStatusPacket(List<MetricsPacket> packets) static StringtoJson(List<MetricsPacket> metrics, boolean addStatus) static voidtoJson(List<MetricsPacket> metrics, OutputStream outputStream, boolean addStatus) static voidtoJsonl(List<MetricsPacket> metrics, OutputStream outputStream, boolean addStatus) static MetricsPacket.BuildertoMetricsPacketBuilder(YamasJsonModel jsonModel) static List<MetricsPacket.Builder>toMetricsPackets(String jsonString) Converts the given json formatted string to a list of metrics packet builders.
-
Constructor Details
-
YamasJsonUtil
public YamasJsonUtil()
-
-
Method Details
-
toMetricsPacketBuilder
-
toMetricsPackets
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. -
appendOptionalStatusPacket
-
toJson
-
toJson
public static void toJson(List<MetricsPacket> metrics, OutputStream outputStream, boolean addStatus) throws IOException - Throws:
IOException
-
toJsonl
public static void toJsonl(List<MetricsPacket> metrics, OutputStream outputStream, boolean addStatus) throws IOException - Throws:
IOException
-