diff --git a/multi/multi__managing_spans_with_annotations.html b/multi/multi__managing_spans_with_annotations.html index 5c5fae1ba..5358b0a17 100644 --- a/multi/multi__managing_spans_with_annotations.html +++ b/multi/multi__managing_spans_with_annotations.html @@ -37,7 +37,7 @@ Its class name has to be passed as the value of the resolv public TagValueResolver tagValueResolver() { return parameter -> "Value from myCustomTagValueResolver"; }

The two preceding examples lead to setting a tag value equal to Value from myCustomTagValueResolver.

11.4.2 Resolving Expressions for a Value

Consider the following annotated method:

@NewSpan
-public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "length() + ' characters'") String test) {
+public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "'hello' + ' characters'") String test) {
 }

No custom implementation of a TagValueExpressionResolver leads to evaluation of the SPEL expression, and a tag with a value of 4 characters is set on the span. If you want to use some other expression resolution mechanism, you can create your own implementation of the bean.

11.4.3 Using the toString() method

Consider the following annotated method:

@NewSpan
 public void getAnnotationForArgumentToString(@SpanTag("test") Long param) {
diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html
index 7c5e132b3..40140f49c 100644
--- a/single/spring-cloud-sleuth.html
+++ b/single/spring-cloud-sleuth.html
@@ -593,7 +593,7 @@ Its class name has to be passed as the value of the resolv
 public TagValueResolver tagValueResolver() {
 	return parameter -> "Value from myCustomTagValueResolver";
 }

The two preceding examples lead to setting a tag value equal to Value from myCustomTagValueResolver.

11.4.2 Resolving Expressions for a Value

Consider the following annotated method:

@NewSpan
-public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "length() + ' characters'") String test) {
+public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "'hello' + ' characters'") String test) {
 }

No custom implementation of a TagValueExpressionResolver leads to evaluation of the SPEL expression, and a tag with a value of 4 characters is set on the span. If you want to use some other expression resolution mechanism, you can create your own implementation of the bean.

11.4.3 Using the toString() method

Consider the following annotated method:

@NewSpan
 public void getAnnotationForArgumentToString(@SpanTag("test") Long param) {
diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml
index 36d75a97f..6d2bd954d 100644
--- a/spring-cloud-sleuth.xml
+++ b/spring-cloud-sleuth.xml
@@ -1365,7 +1365,7 @@ public TagValueResolver tagValueResolver() {
 Resolving Expressions for a Value
 Consider the following annotated method:
 @NewSpan
-public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "length() + ' characters'") String test) {
+public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "'hello' + ' characters'") String test) {
 }
 No custom implementation of a TagValueExpressionResolver leads to evaluation of the SPEL expression, and a tag with a value of 4 characters is set on the span.
 If you want to use some other expression resolution mechanism, you can create your own implementation of the bean.