Package org.jboss.resteasy.tracing
Interface RESTEasyTracingLogger
public interface RESTEasyTracingLogger
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RESTEasyTracingLogger
create
(String invocationId, jakarta.ws.rs.core.Configuration configuration, String loggerNameSuffix) Create new Tracing logger.static RESTEasyTracingLogger
Create new Tracing logger.static RESTEasyTracingLogger
create
(String requestId, String tracingThreshold, String tracingLoggerNameSuffix, String tracingInfoFormat) static RESTEasyTracingLogger
empty()
void
Stores collected tracing messages to response HTTP header.static RESTEasyTracingLogger
getInstance
(HttpRequest request) Returns instance ofTracingLogger
associated with current request processing (propertiesDelegate
).static String
getTracingConfig
(jakarta.ws.rs.core.Configuration configuration) Return configuration type of tracing support according to application configuration.static String
getTracingThreshold
(jakarta.ws.rs.core.Configuration configuration) Get application-wide tracing level threshold.static void
initTracingSupport
(jakarta.ws.rs.core.Configuration configuration, HttpRequest request) According to configuration/request header it initializeRESTEasyTracingLogger
and put it to the request properties.boolean
isLogEnabled
(String eventName) static boolean
isTracingConfigALL
(jakarta.ws.rs.core.Configuration configuration) void
void
logDuration
(String eventName, long fromTimestamp, Object... args) static void
logStart
(HttpRequest request) Log tracing messages START events.long
-
Field Details
-
EMPTY
-
-
Method Details
-
isLogEnabled
-
log
-
logDuration
-
timestamp
-
flush
Stores collected tracing messages to response HTTP header.- Parameters:
headers
- message headers.
-
create
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 idconfiguration
- configurationloggerNameSuffix
- tracing logger name suffix.- Returns:
- new tracing logger.
-
getInstance
Returns instance ofTracingLogger
associated with current request processing (propertiesDelegate
).- Parameters:
request
- http request- Returns:
- returns instance of
TracingLogger
fromResteasyProviderFactory
. Does not returnnull
.
-
empty
-
initTracingSupport
According to configuration/request header it initializeRESTEasyTracingLogger
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 storeRESTEasyTracingLogger
instance to if tracing support is enabled for the request.
-
logStart
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
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
Get application-wide tracing level threshold.- Parameters:
configuration
- configuration- Returns:
- tracing level threshold.
-