Class RequestLogs (2.0.0)

public final class RequestLogs 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.

Inheritance

java.lang.Object > RequestLogs

Implements

Serializable

Constructors

RequestLogs()

public RequestLogs()

Default, zero-argument constructor for RequestLogs.

RequestLogs(LogServicePb.RequestLog requestLog, String offset)

protected RequestLogs(LogServicePb.RequestLog requestLog, String offset)

Constructs a new (external-facing) RequestLogs from an (internal-facing) RequestLog. We scrub out any fields that the Protocol Buffer specification for RequestLog names as Google-only fields.

Parameters
Name Description
requestLog com.google.apphosting.api.logservice.LogServicePb.RequestLog

The RequestLog returned by a Log Read RPC call.

offset String

A String containing an encoded offset from the RequestLog.

Methods

equals(@Nullable Object obj)

public boolean equals(@Nullable Object obj)
Parameter
Name Description
obj @org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
Type Description
boolean
Overrides

getApiMcycles() (deprecated)

public long getApiMcycles()

Deprecated. This value is no longer meaningful.

Returns
Type Description
long

The number of machine cycles spent in API calls while processing this request.

getAppEngineRelease()

public String getAppEngineRelease()
Returns
Type Description
String

App Engine Release, e.g. "1.7.5", or the empty string.

getAppId()

public String getAppId()
Returns
Type Description
String

The application ID that handled this request.

getAppLogLines()

public List<AppLogLine> getAppLogLines()
Returns
Type Description
List<AppLogLine>

A list of application logs associated with this request.

getCombined()

public String getCombined()
Returns
Type Description
String

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
Type Description
double

The estimated cost of this request, in dollars.

getEndTimeUsec()

public long getEndTimeUsec()
Returns
Type Description
long

The time at which the request was known to end processing, in microseconds since the Unix epoch.

getHost()

public String getHost()
Returns
Type Description
String

The Internet host and port number of the resource being requested.

getHttpVersion()

public String getHttpVersion()
Returns
Type Description
String

The HTTP version of this request.

getInstanceKey()

public String getInstanceKey()
Returns
Type Description
String

Mostly-unique identifier for the instance that handled the request, or the empty string.

getIp()

public String getIp()
Returns
Type Description
String

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
Type Description
long

The time required to process this request in microseconds.

getMcycles()

public long getMcycles()
Returns
Type Description
long

The number of machine cycles used to process this request.

getMethod()

public String getMethod()
Returns
Type Description
String

The request's method (e.g., GET, PUT, POST).

getModuleId()

public String getModuleId()
Returns
Type Description
String

The module of the application that handled this request.

getNickname()

public String getNickname()
Returns
Type Description
String

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
Type Description
String

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
Type Description
long

The time, in microseconds, that this request spent in the pending request queue, if it was pending at all.

getReferrer()

public String getReferrer()
Returns
Type Description
String

The referrer URL of this request.

getReplicaIndex()

public int getReplicaIndex()
Returns
Type Description
int

The backend replica that handled the request, or -1 if not serviced by a backend.

getRequestId()

public String getRequestId()
Returns
Type Description
String

A globally unique identifier for a request, based on the request's starting time.

getResource()

public String getResource()
Returns
Type Description
String

The resource path on the server requested by the client. Contains only the path component of the request URL.

getResponseSize()

public long getResponseSize()
Returns
Type Description
long

The size (in bytes) sent back to the client by this request.

getStartTimeUsec()

public long getStartTimeUsec()
Returns
Type Description
long

The time at which this request was known to have begun processing, in microseconds since the Unix epoch.

getStatus()

public int getStatus()
Returns
Type Description
int

The HTTP response status of this request.

getTaskName()

public String getTaskName()
Returns
Type Description
String

The request's task name, if this request was generated via the Task Queue API.

getTaskQueueName()

public String getTaskQueueName()
Returns
Type Description
String

The request's queue name, if this request was generated via the Task Queue API.

getUrlMapEntry()

public String getUrlMapEntry()
Returns
Type Description
String

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
Type Description
String

The user agent used to make this request.

getVersionId()

public String getVersionId()
Returns
Type Description
String

The version of the application that handled this request.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

isFinished()

public boolean isFinished()
Returns
Type Description
boolean

Whether or not this request has been finished. If not, this request is still active.

isLoadingRequest()

public boolean isLoadingRequest()
Returns
Type Description
boolean

Whether or not this request was a loading request.

setApiMcycles(long apiMcycles)

public void setApiMcycles(long apiMcycles)
Parameter
Name Description
apiMcycles long

setAppEngineRelease(String appEngineRelease)

public void setAppEngineRelease(String appEngineRelease)
Parameter
Name Description
appEngineRelease String

setAppId(String appId)

public void setAppId(String appId)
Parameter
Name Description
appId String

setAppLogLines(List<AppLogLine> appLogLines)

public void setAppLogLines(List<AppLogLine> appLogLines)
Parameter
Name Description
appLogLines List<AppLogLine>

setCombined(String combined)

public void setCombined(String combined)
Parameter
Name Description
combined String

setCost(double cost)

public void setCost(double cost)
Parameter
Name Description
cost double

setEndTimeUsec(long endTimeUsec)

public void setEndTimeUsec(long endTimeUsec)
Parameter
Name Description
endTimeUsec long

setFinished(boolean finished)

public void setFinished(boolean finished)
Parameter
Name Description
finished boolean

setHost(String host)

public void setHost(String host)
Parameter
Name Description
host String

setHttpVersion(String httpVersion)

public void setHttpVersion(String httpVersion)
Parameter
Name Description
httpVersion String

setInstanceKey(String instanceKey)

public void setInstanceKey(String instanceKey)
Parameter
Name Description
instanceKey String

setIp(String ip)

public void setIp(String ip)
Parameter
Name Description
ip String

setLatency(long latency)

public void setLatency(long latency)
Parameter
Name Description
latency long

setMcycles(long mcycles)

public void setMcycles(long mcycles)
Parameter
Name Description
mcycles long

setMethod(String method)

public void setMethod(String method)
Parameter
Name Description
method String

setModuleId(String moduleId)

public void setModuleId(String moduleId)
Parameter
Name Description
moduleId String

setNickname(String nickname)

public void setNickname(String nickname)
Parameter
Name Description
nickname String

setOffset(String offset)

public void setOffset(String offset)
Parameter
Name Description
offset String

setPendingTime(long pendingTime)

public void setPendingTime(long pendingTime)
Parameter
Name Description
pendingTime long

setReferrer(String referrer)

public void setReferrer(String referrer)
Parameter
Name Description
referrer String

setReplicaIndex(int replicaIndex)

public void setReplicaIndex(int replicaIndex)
Parameter
Name Description
replicaIndex int

setRequestId(String requestId)

public void setRequestId(String requestId)
Parameter
Name Description
requestId String

setResource(String resource)

public void setResource(String resource)
Parameter
Name Description
resource String

setResponseSize(long responseSize)

public void setResponseSize(long responseSize)
Parameter
Name Description
responseSize long

setStartTimeUsec(long startTimeUsec)

public void setStartTimeUsec(long startTimeUsec)
Parameter
Name Description
startTimeUsec long

setStatus(int status)

public void setStatus(int status)
Parameter
Name Description
status int

setTaskName(String taskName)

public void setTaskName(String taskName)
Parameter
Name Description
taskName String

setTaskQueueName(String taskQueueName)

public void setTaskQueueName(String taskQueueName)
Parameter
Name Description
taskQueueName String

setUrlMapEntry(String urlMapEntry)

public void setUrlMapEntry(String urlMapEntry)
Parameter
Name Description
urlMapEntry String

setUserAgent(String userAgent)

public void setUserAgent(String userAgent)
Parameter
Name Description
userAgent String

setVersionId(String versionId)

public void setVersionId(String versionId)
Parameter
Name Description
versionId String

setWasLoadingRequest(boolean wasLoadingRequest)

public void setWasLoadingRequest(boolean wasLoadingRequest)
Parameter
Name Description
wasLoadingRequest boolean

toString()

public String toString()
Returns
Type Description
String
Overrides