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
NameDescription
requestLogcom.google.apphosting.api.logservice.LogServicePb.RequestLog

The RequestLog returned by a Log Read RPC call.

offsetString

A String containing an encoded offset from the RequestLog.

Methods

equals(@Nullable Object obj)

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

getApiMcycles() (deprecated)

public long getApiMcycles()

Deprecated. This value is no longer meaningful.

Returns
TypeDescription
long

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

getAppEngineRelease()

public String getAppEngineRelease()
Returns
TypeDescription
String

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

getAppId()

public String getAppId()
Returns
TypeDescription
String

The application ID that handled this request.

getAppLogLines()

public List<AppLogLine> getAppLogLines()
Returns
TypeDescription
List<AppLogLine>

A list of application logs associated with this request.

getCombined()

public String getCombined()
Returns
TypeDescription
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
TypeDescription
double

The estimated cost of this request, in dollars.

getEndTimeUsec()

public long getEndTimeUsec()
Returns
TypeDescription
long

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

getHost()

public String getHost()
Returns
TypeDescription
String

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

getHttpVersion()

public String getHttpVersion()
Returns
TypeDescription
String

The HTTP version of this request.

getInstanceKey()

public String getInstanceKey()
Returns
TypeDescription
String

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

getIp()

public String getIp()
Returns
TypeDescription
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
TypeDescription
long

The time required to process this request in microseconds.

getMcycles()

public long getMcycles()
Returns
TypeDescription
long

The number of machine cycles used to process this request.

getMethod()

public String getMethod()
Returns
TypeDescription
String

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

getModuleId()

public String getModuleId()
Returns
TypeDescription
String

The module of the application that handled this request.

getNickname()

public String getNickname()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The referrer URL of this request.

getReplicaIndex()

public int getReplicaIndex()
Returns
TypeDescription
int

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

getRequestId()

public String getRequestId()
Returns
TypeDescription
String

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

getResource()

public String getResource()
Returns
TypeDescription
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
TypeDescription
long

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

getStartTimeUsec()

public long getStartTimeUsec()
Returns
TypeDescription
long

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

getStatus()

public int getStatus()
Returns
TypeDescription
int

The HTTP response status of this request.

getTaskName()

public String getTaskName()
Returns
TypeDescription
String

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

getTaskQueueName()

public String getTaskQueueName()
Returns
TypeDescription
String

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

getUrlMapEntry()

public String getUrlMapEntry()
Returns
TypeDescription
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
TypeDescription
String

The user agent used to make this request.

getVersionId()

public String getVersionId()
Returns
TypeDescription
String

The version of the application that handled this request.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

isFinished()

public boolean isFinished()
Returns
TypeDescription
boolean

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

isLoadingRequest()

public boolean isLoadingRequest()
Returns
TypeDescription
boolean

Whether or not this request was a loading request.

setApiMcycles(long apiMcycles)

public void setApiMcycles(long apiMcycles)
Parameter
NameDescription
apiMcycleslong

setAppEngineRelease(String appEngineRelease)

public void setAppEngineRelease(String appEngineRelease)
Parameter
NameDescription
appEngineReleaseString

setAppId(String appId)

public void setAppId(String appId)
Parameter
NameDescription
appIdString

setAppLogLines(List<AppLogLine> appLogLines)

public void setAppLogLines(List<AppLogLine> appLogLines)
Parameter
NameDescription
appLogLinesList<AppLogLine>

setCombined(String combined)

public void setCombined(String combined)
Parameter
NameDescription
combinedString

setCost(double cost)

public void setCost(double cost)
Parameter
NameDescription
costdouble

setEndTimeUsec(long endTimeUsec)

public void setEndTimeUsec(long endTimeUsec)
Parameter
NameDescription
endTimeUseclong

setFinished(boolean finished)

public void setFinished(boolean finished)
Parameter
NameDescription
finishedboolean

setHost(String host)

public void setHost(String host)
Parameter
NameDescription
hostString

setHttpVersion(String httpVersion)

public void setHttpVersion(String httpVersion)
Parameter
NameDescription
httpVersionString

setInstanceKey(String instanceKey)

public void setInstanceKey(String instanceKey)
Parameter
NameDescription
instanceKeyString

setIp(String ip)

public void setIp(String ip)
Parameter
NameDescription
ipString

setLatency(long latency)

public void setLatency(long latency)
Parameter
NameDescription
latencylong

setMcycles(long mcycles)

public void setMcycles(long mcycles)
Parameter
NameDescription
mcycleslong

setMethod(String method)

public void setMethod(String method)
Parameter
NameDescription
methodString

setModuleId(String moduleId)

public void setModuleId(String moduleId)
Parameter
NameDescription
moduleIdString

setNickname(String nickname)

public void setNickname(String nickname)
Parameter
NameDescription
nicknameString

setOffset(String offset)

public void setOffset(String offset)
Parameter
NameDescription
offsetString

setPendingTime(long pendingTime)

public void setPendingTime(long pendingTime)
Parameter
NameDescription
pendingTimelong

setReferrer(String referrer)

public void setReferrer(String referrer)
Parameter
NameDescription
referrerString

setReplicaIndex(int replicaIndex)

public void setReplicaIndex(int replicaIndex)
Parameter
NameDescription
replicaIndexint

setRequestId(String requestId)

public void setRequestId(String requestId)
Parameter
NameDescription
requestIdString

setResource(String resource)

public void setResource(String resource)
Parameter
NameDescription
resourceString

setResponseSize(long responseSize)

public void setResponseSize(long responseSize)
Parameter
NameDescription
responseSizelong

setStartTimeUsec(long startTimeUsec)

public void setStartTimeUsec(long startTimeUsec)
Parameter
NameDescription
startTimeUseclong

setStatus(int status)

public void setStatus(int status)
Parameter
NameDescription
statusint

setTaskName(String taskName)

public void setTaskName(String taskName)
Parameter
NameDescription
taskNameString

setTaskQueueName(String taskQueueName)

public void setTaskQueueName(String taskQueueName)
Parameter
NameDescription
taskQueueNameString

setUrlMapEntry(String urlMapEntry)

public void setUrlMapEntry(String urlMapEntry)
Parameter
NameDescription
urlMapEntryString

setUserAgent(String userAgent)

public void setUserAgent(String userAgent)
Parameter
NameDescription
userAgentString

setVersionId(String versionId)

public void setVersionId(String versionId)
Parameter
NameDescription
versionIdString

setWasLoadingRequest(boolean wasLoadingRequest)

public void setWasLoadingRequest(boolean wasLoadingRequest)
Parameter
NameDescription
wasLoadingRequestboolean

toString()

public String toString()
Returns
TypeDescription
String
Overrides