class TraceCommonService {

    @VisibleForTesting
    static @Nullable String entriesToJson(List<Trace.Entry> entries) throws IOException {
        if (entries.isEmpty()) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        JsonGenerator jg = jsonFactory.createGenerator(CharStreams.asWriter(sb));
        try {
            writeEntries(jg, entries);
        } finally {
            jg.close();
        }
        return sb.toString();
    }

      TraceCommonService(TraceRepository traceRepository, LiveTraceRepository liveTraceRepository,
            AgentDisplayRepository agentDisplayRepository);

}