Top Description Methods
io.micrometer.tracing.annotation

public @Interface SpanTag

extends Annotation
Annotations
@Retention:RUNTIME
@Inherited
@Target:PARAMETER
Imports
io.micrometer.common.annotation.NoOpValueResolver, .ValueResolver, java.lang.annotation.*

There are 3 different ways to add tags to a span. All of them are controlled by the annotation values. Precedence is:

try with the ValueResolver bean if the value of the bean wasn't set, try to evaluate a SPEL expression if there’s no SPEL expression just return a toString() value of the parameter

Author
Christian Schwerdtfeger
Since
1.0.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

an expression
expression
()

Execute this expression to calculate the tag value.

public String

Returns:

the tag value
key
()

The name of the key of the tag which should be created.

public Class<? extends ValueResolver>

Returns:

ValueResolver bean
resolver
()

Use this bean to resolve the tag value.

public String

Returns:

the tag key
value
()

The name of the key of the tag which should be created.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

expressionback to summary
public String expression()

Execute this expression to calculate the tag value. Will be analyzed if no value of the SpanTag#resolver() was set.

Returns:String

an expression

keyback to summary
public String key()

The name of the key of the tag which should be created.

Returns:String

the tag value

resolverback to summary
public Class<? extends ValueResolver> resolver()

Use this bean to resolve the tag value. Has the highest precedence.

Returns:Class<? extends ValueResolver>

ValueResolver bean

valueback to summary
public String value()

The name of the key of the tag which should be created.

Returns:String

the tag key