Interface InstrumentationLogger
- All Known Implementing Classes:
DefaultInstrumentationLogger
@ParametersAreNonnullByDefault
@Internal
public interface InstrumentationLogger
Collects the instrumentation data and saves it to a datastore.
- Since:
- v7.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidClear all the data collected in the memory buffer.Fetch the current list of statistics stored in memory.voidsave(RequestData requestData, List<? extends Statistics> requestStats, Optional<Long> requestTime) Saves request data to the queue above.voidsave(RequestData requestData, List<? extends Statistics> requestStats, Optional<Long> requestTime, Exception exception) Saves request data to the queue above and generates a stacktrace that it inserts in the log.voidsave(String traceId, String path, List<? extends Statistics> requestData, Optional<Long> requestTime) Saves request data to the queue above.
-
Method Details
-
save
void save(String traceId, String path, List<? extends Statistics> requestData, Optional<Long> requestTime) Saves request data to the queue above. The queue will store the last 100 requests by default. As new requests are received the oldest are removed.- Parameters:
traceId- The ID for this request.path- the path of the URL.requestData- The list of cache statistics.requestTime- The time in nanoseconds that the request took to complete.
-
save
void save(RequestData requestData, List<? extends Statistics> requestStats, Optional<Long> requestTime) Saves request data to the queue above. The queue will store the last 100 requests by default. As new requests are received the oldest are removed.- Parameters:
requestData- data associated with the request.requestStats- The list of cache statistics.requestTime- The time of the request in nanoseconds. If zero, we did not collect any time.
-
save
void save(RequestData requestData, List<? extends Statistics> requestStats, Optional<Long> requestTime, Exception exception) Saves request data to the queue above and generates a stacktrace that it inserts in the log. The queue will store the last 100 requests by default. As new requests are received the oldest are removed.- Parameters:
requestData- data associated with the request.requestStats- The list of cache statistics.requestTime- The time of the request in nanoseconds. If zero, we did not collect any time.exception- An exception to be included with the log. This can be used if you require a stack trace to be recorded.
-
getLogEntriesFromBuffer
Fetch the current list of statistics stored in memory.- Returns:
- A copy of the current list.
-
clearMemoryBuffer
void clearMemoryBuffer()Clear all the data collected in the memory buffer.
-