Class OpenTracingService

  • All Implemented Interfaces:
    EventListener

    @Service(name="opentracing-service")
    public class OpenTracingService
    extends Object
    implements EventListener
    Service class for the OpenTracing integration.
    Author:
    Andrew Pielage
    • Constructor Detail

      • OpenTracingService

        public OpenTracingService()
    • Method Detail

      • getTracer

        public io.opentracing.Tracer getTracer​(String applicationName)
        Gets the tracer instance for the given application, or creates one if there isn't one.
        Parameters:
        applicationName - The name of the application to get or create the Tracer for
        Returns:
        The Tracer instance for the given application
      • isEnabled

        public boolean isEnabled()
        Pass-through method that checks if Request Tracing is enabled.
        Returns:
        True if the Request Tracing Service is enabled
      • getApplicationName

        public String getApplicationName​(InvocationManager invocationManager)
        Gets the application name from the invocation manager. Failing that, it will use the module name or component name.
        Parameters:
        invocationManager - The invocation manager to get the application name from
        Returns:
        The application name
      • getApplicationName

        public String getApplicationName​(InvocationManager invocationManager,
                                         jakarta.interceptor.InvocationContext invocationContext)
        Gets the application name from the invocation manager. Failing that, it will use the module name, component name, or method signature (in that order).
        Parameters:
        invocationManager - The invocation manager to get the application name from
        invocationContext - The context of the current invocation
        Returns:
        The application name