private static MetricsPacket.Builder newServicePacket(GenericService service) {
        return new MetricsPacket.Builder(ServiceId.toServiceId(service.name))
                .statusCode(StatusCode.fromString(service.status.code).ordinal())
                .statusMessage(service.status.description)
                .timestamp(service.timeAsInstant());
    }
Utilities for converting between metrics packets and the generic json format.

@author gjoranv
metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/json/GenericJsonUtil.java