CurrentSpanCustomizer
, NoopSpanCustomizer
, Span
public interface SpanCustomizer
This type is safer to expose directly to users than Span
, as it has no hooks that
can affect the span lifecycle.
While unnecessary when tagging constants, guard potentially expensive operations on the
NoopSpanCustomizer
type.
Ex.
if (!(customizer instanceof NoopSpanCustomizer)) {
customizer.tag("summary", computeSummary());
}
Modifier and Type | Method | Description |
---|---|---|
SpanCustomizer |
annotate(String value) |
Associates an event that explains latency with the current system time.
|
SpanCustomizer |
name(String name) |
Sets the string name for the logical operation this span represents.
|
SpanCustomizer |
tag(String key,
String value) |
Tags give your span context for search, viewing and analysis.
|
SpanCustomizer name(String name)
SpanCustomizer tag(String key, String value)
key
- Name used to lookup spans, such as "your_app.version".value
- String value, cannot be null
.SpanCustomizer annotate(String value)
value
- A short tag indicating the event, like "finagle.retry"Copyright © 2018 OpenZipkin. All rights reserved.