@Service(name="requesttracing-service") @RunLevel(value=10) public class RequestTracingService extends Object implements EventListener, ConfigListener, MonitoringDataSource
EventListener.Event<T>
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_BUS_LISTENER_NAME |
Constructor and Description |
---|
RequestTracingService() |
Modifier and Type | Method and Description |
---|---|
void |
addSpanLog(RequestTraceSpanLog spanLog) |
void |
bootstrapNotifierList()
Configures notifiers with request tracing and starts any enabled ones.
|
void |
bootstrapRequestTracingService()
Starts the request tracing service
|
UnprocessedChangeEvents |
changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changed
|
void |
collect(MonitoringDataCollector rootCollector)
Collects all the data points of this at the current moment.
|
void |
endTrace() |
void |
event(EventListener.Event event)
Process a Glassfish/Payara event
|
UUID |
getConversationID()
Retrieves the current Conversation ID
|
RequestTracingExecutionOptions |
getExecutionOptions() |
RequestTraceStoreInterface |
getHistoricRequestTraceStore()
Returns the RequestTraceStore used for storing historical traces
|
RequestTraceStoreInterface |
getRequestTraceStore()
Returns the RequestTraceStore used for storing traces
|
UUID |
getStartingTraceID() |
Long |
getThresholdValueInNanos() |
boolean |
isRequestTracingEnabled() |
boolean |
isTraceInProgress()
Returns true if a trace has started and not yet completed.
|
void |
setTraceId(UUID newID)
Reset the conversation ID This is especially useful for trace propagation
across threads when the event tracer can receive the conversation ID
propagated to it
|
RequestTraceSpan |
startTrace(RequestTraceSpan span) |
RequestTraceSpan |
startTrace(RequestTraceSpan span,
long timestampMillis) |
RequestTraceSpan |
startTrace(String traceName)
Starts a new request trace
|
RequestTraceSpan |
startTrace(UUID propagatedTraceId,
UUID propagatedParentId,
RequestTraceSpan.SpanContextRelationshipType propagatedRelationshipType,
String traceName) |
void |
traceSpan(RequestTraceSpan requestEvent)
Adds a new event to the request trace currently in progress
|
void |
traceSpan(RequestTraceSpan requestEvent,
long timestampMillis) |
public static final String EVENT_BUS_LISTENER_NAME
public void event(EventListener.Event event)
EventListener
event
in interface EventListener
public void bootstrapRequestTracingService()
public void bootstrapNotifierList()
public UUID getConversationID()
public UUID getStartingTraceID()
public void setTraceId(UUID newID)
newID
- public boolean isTraceInProgress()
public RequestTraceSpan startTrace(String traceName)
public RequestTraceSpan startTrace(RequestTraceSpan span)
public RequestTraceSpan startTrace(RequestTraceSpan span, long timestampMillis)
public RequestTraceSpan startTrace(UUID propagatedTraceId, UUID propagatedParentId, RequestTraceSpan.SpanContextRelationshipType propagatedRelationshipType, String traceName)
public void traceSpan(RequestTraceSpan requestEvent)
requestEvent
- public void traceSpan(RequestTraceSpan requestEvent, long timestampMillis)
public void endTrace()
public void addSpanLog(RequestTraceSpanLog spanLog)
public Long getThresholdValueInNanos()
public boolean isRequestTracingEnabled()
public RequestTracingExecutionOptions getExecutionOptions()
public UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
ConfigListener
changed
in interface ConfigListener
events
- list of changespublic RequestTraceStoreInterface getHistoricRequestTraceStore()
public RequestTraceStoreInterface getRequestTraceStore()
public void collect(MonitoringDataCollector rootCollector)
MonitoringDataSource
collect
in interface MonitoringDataSource
rootCollector
- the MonitoringDataCollector
instance to use to collect the data points of this sourceCopyright © 2019. All rights reserved.