Interface RESTEasyTracingLogger


  • public interface RESTEasyTracingLogger
    • Method Detail

      • isLogEnabled

        boolean isLogEnabled​(String eventName)
      • logDuration

        void logDuration​(String eventName,
                         long fromTimestamp,
                         Object... args)
      • timestamp

        long timestamp​(String eventName)
      • flush

        void flush​(javax.ws.rs.core.MultivaluedMap<String,​Object> headers)
        Stores collected tracing messages to response HTTP header.
        Parameters:
        headers - message headers.
      • create

        static RESTEasyTracingLogger create​(String requestId,
                                            String threshold,
                                            String loggerNameSuffix)
        Create new Tracing logger.
        Parameters:
        requestId - request id.
        threshold - tracing level threshold.
        loggerNameSuffix - tracing logger name suffix.
        Returns:
        new tracing logger.
      • create

        static RESTEasyTracingLogger create​(String invocationId,
                                            javax.ws.rs.core.Configuration configuration,
                                            String loggerNameSuffix)
        Create new Tracing logger. Used by client invocation.
        Parameters:
        invocationId - calling ClientInvocation instance id
        configuration - configuration
        loggerNameSuffix - tracing logger name suffix.
        Returns:
        new tracing logger.
      • getInstance

        static RESTEasyTracingLogger getInstance​(HttpRequest request)
        Returns instance of TracingLogger associated with current request processing (propertiesDelegate).
        Parameters:
        request - http request
        Returns:
        returns instance of TracingLogger from ResteasyProviderFactory. Does not return null.
      • initTracingSupport

        static void initTracingSupport​(javax.ws.rs.core.Configuration configuration,
                                       HttpRequest request)
        According to configuration/request header it initialize RESTEasyTracingLogger and put it to the request properties.
        Parameters:
        configuration - application-wide tracing configuration type and tracing level threshold.
        request - request instance to get runtime properties to store RESTEasyTracingLogger instance to if tracing support is enabled for the request.
      • logStart

        static void logStart​(HttpRequest request)
        Log tracing messages START events.
        Parameters:
        request - container request instance to get runtime properties to check if tracing support is enabled for the request.
      • isTracingConfigALL

        static boolean isTracingConfigALL​(javax.ws.rs.core.Configuration configuration)
      • getTracingConfig

        static String getTracingConfig​(javax.ws.rs.core.Configuration configuration)
        Return configuration type of tracing support according to application configuration.

        By default tracing support is switched OFF.

        Parameters:
        configuration - configuration
        Returns:
        the configuration type
      • getTracingThreshold

        static String getTracingThreshold​(javax.ws.rs.core.Configuration configuration)
        Get application-wide tracing level threshold.
        Parameters:
        configuration - configuration
        Returns:
        tracing level threshold.