Annotation Type Traced

  • @Documented
    public @interface Traced
    This annotation allows fine-tuned control over which classes and methods create OpenTracing spans. By default, all JAX-RS methods implicitly have this annotation. This annotation applies to a class or a method. When applied to a class, this annotation is applied to all methods of the class. If the annotation is applied to a class and method then the annotation applied to the method takes precedence. The annotation starts a Span at the beginning of the method, and finishes the Span at the end of the method. This annotation also has InterceptorBinding for frameworks to process all of each application's explicit Traced annotations.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String operationName
      Default is "".
      boolean value
      Defaults to true.
    • Element Detail

      • value

        boolean value
        Defaults to true. If @Traced is specified at the class level, then @Traced(false) is used to annotate specific methods to disable creation of a Span for those methods. By default all JAX-RS endpoint methods are traced. To disable Span creation of a specific JAX-RS endpoint, the @Traced(false) annotation can be used. When the @Traced(false) annotation is used for a JAX-RS endpoint method, the upstream SpanContext will not be extracted. Any Spans created, either automatically for outbound requests, or explicitly using an injected Tracer, will not have an upstream parent Span in the Span hierarchy.
        whether this method should be traced.
      • operationName

        java.lang.String operationName
        Default is "". If the @Traced annotation finds the operationName as "", the default operation name is used. For a JAX-RS endpoint method, it is ${HTTP method}:${package name}.${class name}.${method name}. If the annotated method is not a JAX-RS endpoint, the default operation name of the new Span for the method is: ${package name}.${class name}.${method name}. If operationName is specified on a class, that operationName will be used for all methods of the class unless a method explicitly overrides it with its own operationName.
        the name to give the Span for this trace point.