public class LoggingSpanCollector extends Object implements SpanCollector
SpanCollector
implementation which logs the span through jul at INFO level.
Can be used for testing and debugging.Constructor and Description |
---|
LoggingSpanCollector() |
LoggingSpanCollector(String loggerName) |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultAnnotation(String key,
String value)
Adds a fixed annotation that will be added to every span that is submitted to this collector.
|
void |
collect(Span span)
Collect span.
|
public LoggingSpanCollector()
public LoggingSpanCollector(String loggerName)
public void collect(Span span)
collect
in interface SpanCollector
span
- Span, should not be null
.public void addDefaultAnnotation(String key, String value)
addDefaultAnnotation
in interface SpanCollector
key
- Annotation name/key. Should not be empty or null
.value
- Annotation value. Should not be null
.Copyright © 2016. All rights reserved.