Package com.google.appengine.api.log
Class RequestLogs
- java.lang.Object
-
- com.google.appengine.api.log.RequestLogs
-
- All Implemented Interfaces:
Serializable
public final class RequestLogs extends Object implements Serializable
RequestLogs contain all the log information for a single request. This includes the request log as well as any application logs (which may correspond to logging statements in the user's code or messages we have inserted to alert them to certain conditions we have noticed). Additionally, we include information about this request outside of those logs, such as how long the request took, the IP of the user performing the request, and so on.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RequestLogs()Default, zero-argument constructor for RequestLogs.
-
Method Summary
-
-
-
Method Detail
-
getApiMcycles
@Deprecated public long getApiMcycles()
Deprecated.This value is no longer meaningful.- Returns:
- The number of machine cycles spent in API calls while processing this request.
-
getAppId
public String getAppId()
- Returns:
- The application ID that handled this request.
-
getAppLogLines
public List<AppLogLine> getAppLogLines()
- Returns:
- A list of application logs associated with this request.
-
getCombined
public String getCombined()
- Returns:
- The Apache-format combined log entry for this request. While the information in this field can be constructed from the rest of this message, we include this method for convenience.
-
getCost
public double getCost()
- Returns:
- The estimated cost of this request, in dollars.
-
getEndTimeUsec
public long getEndTimeUsec()
- Returns:
- The time at which the request was known to end processing, in microseconds since the Unix epoch.
-
getHost
public String getHost()
- Returns:
- The Internet host and port number of the resource being requested.
-
getHttpVersion
public String getHttpVersion()
- Returns:
- The HTTP version of this request.
-
getInstanceKey
public String getInstanceKey()
- Returns:
- Mostly-unique identifier for the instance that handled the request, or the empty string.
-
getIp
public String getIp()
- Returns:
- The origin IP address of this request. App Engine uses an origin IP address from the 0.0.0.0/8 range when the request is to a web hook. Some examples of web hooks are task queues, cron jobs and warming requests.
-
getLatencyUsec
public long getLatencyUsec()
- Returns:
- The time required to process this request in microseconds.
-
getMcycles
public long getMcycles()
- Returns:
- The number of machine cycles used to process this request.
-
getMethod
public String getMethod()
- Returns:
- The request's method (e.g., GET, PUT, POST).
-
getNickname
public String getNickname()
- Returns:
- The nickname of the user that made the request. An empty string is returned if the user is not logged in.
-
getOffset
public String getOffset()
- Returns:
- A Base64-encoded offset that may be used with a subsequent LogQuery to continue reading logs at the point in time immediately following this request.
-
getPendingTimeUsec
public long getPendingTimeUsec()
- Returns:
- The time, in microseconds, that this request spent in the pending request queue, if it was pending at all.
-
getReferrer
public String getReferrer()
- Returns:
- The referrer URL of this request.
-
getReplicaIndex
public int getReplicaIndex()
- Returns:
- The backend replica that handled the request, or -1 if not serviced by a backend.
-
getRequestId
public String getRequestId()
- Returns:
- A globally unique identifier for a request, based on the request's starting time.
-
getResource
public String getResource()
- Returns:
- The resource path on the server requested by the client. Contains only the path component of the request URL.
-
getResponseSize
public long getResponseSize()
- Returns:
- The size (in bytes) sent back to the client by this request.
-
getStartTimeUsec
public long getStartTimeUsec()
- Returns:
- The time at which this request was known to have begun processing, in microseconds since the Unix epoch.
-
getStatus
public int getStatus()
- Returns:
- The HTTP response status of this request.
-
getTaskName
public String getTaskName()
- Returns:
- The request's task name, if this request was generated via the Task Queue API.
-
getTaskQueueName
public String getTaskQueueName()
- Returns:
- The request's queue name, if this request was generated via the Task Queue API.
-
getUrlMapEntry
public String getUrlMapEntry()
- Returns:
- The file or class within the URL mapping used for this request. Useful for tracking down the source code which was responsible for managing the request, especially for multiply mapped handlers.
-
getUserAgent
public String getUserAgent()
- Returns:
- The user agent used to make this request.
-
getModuleId
public String getModuleId()
- Returns:
- The module of the application that handled this request.
-
getVersionId
public String getVersionId()
- Returns:
- The version of the application that handled this request.
-
isFinished
public boolean isFinished()
- Returns:
- Whether or not this request has been finished. If not, this request is still active.
-
isLoadingRequest
public boolean isLoadingRequest()
- Returns:
- Whether or not this request was a loading request.
-
getAppEngineRelease
public String getAppEngineRelease()
- Returns:
- App Engine Release, e.g. "1.7.5", or the empty string.
-
setApiMcycles
public void setApiMcycles(long apiMcycles)
-
setAppId
public void setAppId(String appId)
-
setAppLogLines
public void setAppLogLines(List<AppLogLine> appLogLines)
-
setCombined
public void setCombined(String combined)
-
setCost
public void setCost(double cost)
-
setEndTimeUsec
public void setEndTimeUsec(long endTimeUsec)
-
setFinished
public void setFinished(boolean finished)
-
setHost
public void setHost(String host)
-
setHttpVersion
public void setHttpVersion(String httpVersion)
-
setInstanceKey
public void setInstanceKey(String instanceKey)
-
setIp
public void setIp(String ip)
-
setLatency
public void setLatency(long latency)
-
setMcycles
public void setMcycles(long mcycles)
-
setMethod
public void setMethod(String method)
-
setNickname
public void setNickname(String nickname)
-
setOffset
public void setOffset(String offset)
-
setPendingTime
public void setPendingTime(long pendingTime)
-
setReferrer
public void setReferrer(String referrer)
-
setReplicaIndex
public void setReplicaIndex(int replicaIndex)
-
setRequestId
public void setRequestId(String requestId)
-
setResource
public void setResource(String resource)
-
setResponseSize
public void setResponseSize(long responseSize)
-
setStartTimeUsec
public void setStartTimeUsec(long startTimeUsec)
-
setStatus
public void setStatus(int status)
-
setTaskName
public void setTaskName(String taskName)
-
setTaskQueueName
public void setTaskQueueName(String taskQueueName)
-
setUrlMapEntry
public void setUrlMapEntry(String urlMapEntry)
-
setUserAgent
public void setUserAgent(String userAgent)
-
setModuleId
public void setModuleId(String moduleId)
-
setVersionId
public void setVersionId(String versionId)
-
setWasLoadingRequest
public void setWasLoadingRequest(boolean wasLoadingRequest)
-
setAppEngineRelease
public void setAppEngineRelease(String appEngineRelease)
-
-