SpanCustomizer
public final class CurrentSpanCustomizer extends Object implements SpanCustomizer
Handles the case of there being no current span in scope.
Modifier and Type | Method | Description |
---|---|---|
SpanCustomizer |
annotate(long timestamp,
String value) |
Like
SpanCustomizer.annotate(String) , except with a given timestamp in microseconds. |
SpanCustomizer |
annotate(String value) |
Associates an event that explains latency with the current system time.
|
static CurrentSpanCustomizer |
create(Tracing tracing) |
Creates a span customizer that will affect the current span in scope if present
|
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.
|
public static CurrentSpanCustomizer create(Tracing tracing)
public SpanCustomizer name(String name)
name
in interface SpanCustomizer
public SpanCustomizer tag(String key, String value)
TraceKeys.SQL_QUERY
isn't searchable, but it can help in debugging when viewing a trace.tag
in interface SpanCustomizer
key
- Name used to lookup spans, such as "your_app.version". See TraceKeys
for
standard ones.value
- String value, cannot be null
.public SpanCustomizer annotate(String value)
annotate
in interface SpanCustomizer
value
- A short tag indicating the event, like "finagle.retry"Constants
public SpanCustomizer annotate(long timestamp, String value)
SpanCustomizer.annotate(String)
, except with a given timestamp in microseconds.annotate
in interface SpanCustomizer
Copyright © 2018 OpenZipkin. All rights reserved.