001package org.avaje.metric; 002 003import java.util.List; 004 005/** 006 * Holds the details for a request including it's timing entries. 007 */ 008public interface RequestTiming { 009 010 /** 011 * Set the external request id (typically obtaining from MDC logging context). 012 * <p> 013 * This is an optional but useful to be able to relate the request timing output 014 * to a specific application request. 015 * </p> 016 */ 017 void setExternalRequestId(String externalRequestId); 018 019 /** 020 * Return the external request id if it had been set. 021 * <p> 022 * This is an optional but useful to be able to relate the request timing output 023 * to a specific application request. 024 * </p> 025 */ 026 String getExternalRequestId(); 027 028 /** 029 * Return the time the request was reported. 030 */ 031 long getReportTime(); 032 033 /** 034 * Return the entries for the request. 035 */ 036 List<RequestTimingEntry> getEntries(); 037 038}