@Internal
public interface InstrumentationListenerManager
Modifier and Type | Method and Description |
---|---|
void |
addRequestListener(com.atlassian.instrumentation.caches.RequestListener listener)
Add a listener
|
void |
applyToAllListeners(java.util.function.Consumer<com.atlassian.instrumentation.caches.RequestListener> apply)
Apply function to each listener.
|
Optional<String> |
getCurrentPath() |
Optional<String> |
getCurrentTraceId() |
void |
processOnEndListeners(String path,
String traceId,
Optional<String> spanId,
Optional<String> parentSpanId,
Optional<Long> requestTime)
Runs all the registered RequestListeners at the end of the
Request processing.
|
void |
processOnStartListeners()
Runs all the registered RequestListeners at the beginning of the Request processing.
|
void |
removeRequestListener(com.atlassian.instrumentation.caches.RequestListener listener)
Remove a listener.
|
void processOnStartListeners()
void processOnEndListeners(String path, String traceId, Optional<String> spanId, Optional<String> parentSpanId, Optional<Long> requestTime)
path
- The request pathtraceId
- If the request has an X-B3-traceId header then we use this as the unique ID.spanId
- If X_B3_SPAN_ID is set on the request, pass this throughparentSpanId
- If X_B3_PARENT_SPAN_ID is set on the request, pass it through.requestTime
- An @{link Optional} that may contain the request time.void addRequestListener(com.atlassian.instrumentation.caches.RequestListener listener)
listener
- The listener to add.void removeRequestListener(com.atlassian.instrumentation.caches.RequestListener listener)
listener
- The listener to remove.void applyToAllListeners(java.util.function.Consumer<com.atlassian.instrumentation.caches.RequestListener> apply)
apply
- Run a function on each listener.@Nonnull Optional<String> getCurrentPath()
Copyright © 2002-2016 Atlassian. All Rights Reserved.