Annotation Type SpanTag
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
TagValueResolver 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- Since:
- 1.2.0
- Author:
- Christian Schwerdtfeger
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
- Returns:
- - The name of the key of the tag which should be created.
- Default:
- ""
-
key
- Returns:
- - The name of the key of the tag which should be created.
- Default:
- ""
-
expression
String expression- Returns:
- - Execute this SPEL expression to calculate the tag value. Will be analyzed
if no value of the
resolver()was set.
- Default:
- ""
-
resolver
Class<? extends TagValueResolver> resolver- Returns:
- - Use this bean to resolve the tag value. Has the highest precedence.
- Default:
- org.springframework.cloud.sleuth.annotation.NoOpTagValueResolver.class
-