Package brave
Enum NoopSpanCustomizer
- All Implemented Interfaces:
SpanCustomizer
,Serializable
,Comparable<NoopSpanCustomizer>
,java.lang.constant.Constable
public enum NoopSpanCustomizer extends Enum<NoopSpanCustomizer> implements SpanCustomizer
Performs no operations as the span represented by this is not sampled to report to the tracing
system.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
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.String
toString()
static NoopSpanCustomizer
valueOf(String name)
Returns the enum constant of this type with the specified name.static NoopSpanCustomizer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
name
Description copied from interface:SpanCustomizer
Sets the string name for the logical operation this span represents.- Specified by:
name
in interfaceSpanCustomizer
-
tag
Description copied from interface:SpanCustomizer
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.Note:To guard potentially expensive parsing, implement
Tag
instead, which avoids parsing into a no-op span.Ex.
{@code SUMMARY_TAG = new Tag
("summary") { - Specified by:
tag
in interfaceSpanCustomizer
- Parameters:
key
- Name used to lookup spans, such as "your_app.version".value
- String value, cannot benull
.- See Also:
Tag.tag(Object, SpanCustomizer)
-
annotate
Description copied from interface:SpanCustomizer
Associates an event that explains latency with the current system time.- Specified by:
annotate
in interfaceSpanCustomizer
- Parameters:
value
- A short tag indicating the event, like "finagle.retry"
-
toString
- Overrides:
toString
in classEnum<NoopSpanCustomizer>
-