Top Description Methods
io.micrometer.tracing

public @Interface SpanName

extends Annotation
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

Annotation to provide the name for the span. You should annotate all your custom Runnable or Callable classes for the instrumentation logic to pick up how to name the span. Having for example the following code
@SpanName("custom-operation")
    class CustomRunnable implements Runnable {
        @Override
        public void run() {
         // latency of this method will be recorded in a span named "custom-operation"
        }
     }
Will result in creating a span with name custom-operation. When there's no @SpanName annotation, toString is used. Here's an example of the above, but via an anonymous instance.
return new Runnable() {
         -- snip --

         @Override
         public String toString() {
             return "custom-operation";
         }
    };
Author
Marcin Grzejszczak
Since
1.0.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

- value of the span name.
value
()

Name of the span to be resolved at runtime.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

Name of the span to be resolved at runtime.

Returns:String

- value of the span name.