-
- All Known Implementing Classes:
CurrentSpanCustomizer,NoopSpanCustomizer,Span
public interface SpanCustomizerSimple interface users can customize a span with. For example, this can add custom tags useful in looking up spans.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
NoopSpanCustomizertype.Ex.
if (!(customizer instanceof NoopSpanCustomizer)) { customizer.tag("summary", computeSummary()); }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SpanCustomizerannotate(java.lang.String value)Associates an event that explains latency with the current system time.SpanCustomizername(java.lang.String name)Sets the string name for the logical operation this span represents.SpanCustomizertag(java.lang.String key, java.lang.String value)Tags give your span context for search, viewing and analysis.
-
-
-
Method Detail
-
name
SpanCustomizer name(java.lang.String name)
Sets the string name for the logical operation this span represents.
-
tag
SpanCustomizer tag(java.lang.String key, java.lang.String value)
Tags give your span context for search, viewing and analysis. For example, a key "your_app.version" would let you lookup spans by version. A tag "sql.query" isn't searchable, but it can help in debugging when viewing a trace.- Parameters:
key- Name used to lookup spans, such as "your_app.version".value- String value, cannot benull.
-
annotate
SpanCustomizer annotate(java.lang.String value)
Associates an event that explains latency with the current system time.- Parameters:
value- A short tag indicating the event, like "finagle.retry"
-
-