Interface RESTEasyTracingLogger


public interface RESTEasyTracingLogger
  • Field Details

  • Method Details

    • isLogEnabled

      boolean isLogEnabled(String eventName)
    • log

      void log(String eventName, Object... args)
    • logDuration

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

      long timestamp(String eventName)
    • flush

      void flush(jakarta.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 requestId, String tracingThreshold, String tracingLoggerNameSuffix, String tracingInfoFormat)
    • create

      static RESTEasyTracingLogger create(String invocationId, jakarta.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.
    • empty

      static RESTEasyTracingLogger empty()
    • initTracingSupport

      static void initTracingSupport(jakarta.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(jakarta.ws.rs.core.Configuration configuration)
    • getTracingConfig

      static String getTracingConfig(jakarta.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(jakarta.ws.rs.core.Configuration configuration)
      Get application-wide tracing level threshold.
      Parameters:
      configuration - configuration
      Returns:
      tracing level threshold.