Class StringTraceRenderer
java.lang.Object
org.apache.hadoop.hbase.client.trace.StringTraceRenderer
A Rudimentary tool for visualizing a hierarchy of spans. Given a collection of spans, indexes
them from parents to children and prints them out one per line, indented.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<StringTraceRenderer.Node>
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorDescriptionStringTraceRenderer
(Collection<io.opentelemetry.sdk.trace.data.SpanData> spans) -
Method Summary
Modifier and TypeMethodDescriptionprivate static List<StringTraceRenderer.Node>
findRoots
(Map<String, StringTraceRenderer.Node> spansById) private static Map<String,
StringTraceRenderer.Node> indexSpansById
(Collection<io.opentelemetry.sdk.trace.data.SpanData> spans) private static void
populateChildren
(Map<String, StringTraceRenderer.Node> spansById) private static String
render
(io.opentelemetry.sdk.trace.data.SpanData spanData) private static String
render
(io.opentelemetry.sdk.trace.data.SpanData spanData, int indent, boolean isFirst) void
private static void
render
(Consumer<String> writer, StringTraceRenderer.Node node, int indent, boolean isFirst)
-
Field Details
-
logger
-
graphs
-
-
Constructor Details
-
StringTraceRenderer
-
-
Method Details
-
indexSpansById
private static Map<String,StringTraceRenderer.Node> indexSpansById(Collection<io.opentelemetry.sdk.trace.data.SpanData> spans) -
populateChildren
-
findRoots
private static List<StringTraceRenderer.Node> findRoots(Map<String, StringTraceRenderer.Node> spansById) -
render
-
render
private static void render(Consumer<String> writer, StringTraceRenderer.Node node, int indent, boolean isFirst) -
render
-
render
-