RequestLogs (Google App Engine API for Java)

com.google.appengine.api.log

Class RequestLogs

  • java.lang.Object
    • com.google.appengine.api.log.RequestLogs
  • All Implemented Interfaces:
    java.io.Serializable


    public final class RequestLogs
    extends java.lang.Object
    implements java.io.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 Detail

      • RequestLogs

        public RequestLogs()
        Default, zero-argument constructor for RequestLogs.
    • 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 java.lang.String getAppId()
        Returns:
        The application ID that handled this request.
      • getAppLogLines

        public java.util.List<AppLogLine> getAppLogLines()
        Returns:
        A list of application logs associated with this request.
      • getCombined

        public java.lang.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 java.lang.String getHost()
        Returns:
        The Internet host and port number of the resource being requested.
      • getHttpVersion

        public java.lang.String getHttpVersion()
        Returns:
        The HTTP version of this request.
      • getInstanceKey

        public java.lang.String getInstanceKey()
        Returns:
        Mostly-unique identifier for the instance that handled the request, or the empty string.
      • getIp

        public java.lang.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 java.lang.String getMethod()
        Returns:
        The request's method (e.g., GET, PUT, POST).
      • getNickname

        public java.lang.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 java.lang.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 java.lang.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 java.lang.String getRequestId()
        Returns:
        A globally unique identifier for a request, based on the request's starting time.
      • getResource

        public java.lang.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 java.lang.String getTaskName()
        Returns:
        The request's task name, if this request was generated via the Task Queue API.
      • getTaskQueueName

        public java.lang.String getTaskQueueName()
        Returns:
        The request's queue name, if this request was generated via the Task Queue API.
      • getUrlMapEntry

        public java.lang.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 java.lang.String getUserAgent()
        Returns:
        The user agent used to make this request.
      • getModuleId

        public java.lang.String getModuleId()
        Returns:
        The module of the application that handled this request.
      • getVersionId

        public java.lang.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 java.lang.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(java.lang.String appId)
      • setAppLogLines

        public void setAppLogLines(java.util.List<AppLogLine> appLogLines)
      • setCombined

        public void setCombined(java.lang.String combined)
      • setCost

        public void setCost(double cost)
      • setEndTimeUsec

        public void setEndTimeUsec(long endTimeUsec)
      • setFinished

        public void setFinished(boolean finished)
      • setHost

        public void setHost(java.lang.String host)
      • setHttpVersion

        public void setHttpVersion(java.lang.String httpVersion)
      • setInstanceKey

        public void setInstanceKey(java.lang.String instanceKey)
      • setIp

        public void setIp(java.lang.String ip)
      • setLatency

        public void setLatency(long latency)
      • setMcycles

        public void setMcycles(long mcycles)
      • setMethod

        public void setMethod(java.lang.String method)
      • setNickname

        public void setNickname(java.lang.String nickname)
      • setOffset

        public void setOffset(java.lang.String offset)
      • setPendingTime

        public void setPendingTime(long pendingTime)
      • setReferrer

        public void setReferrer(java.lang.String referrer)
      • setReplicaIndex

        public void setReplicaIndex(int replicaIndex)
      • setRequestId

        public void setRequestId(java.lang.String requestId)
      • setResource

        public void setResource(java.lang.String resource)
      • setResponseSize

        public void setResponseSize(long responseSize)
      • setStartTimeUsec

        public void setStartTimeUsec(long startTimeUsec)
      • setStatus

        public void setStatus(int status)
      • setTaskName

        public void setTaskName(java.lang.String taskName)
      • setTaskQueueName

        public void setTaskQueueName(java.lang.String taskQueueName)
      • setUrlMapEntry

        public void setUrlMapEntry(java.lang.String urlMapEntry)
      • setUserAgent

        public void setUserAgent(java.lang.String userAgent)
      • setModuleId

        public void setModuleId(java.lang.String moduleId)
      • setVersionId

        public void setVersionId(java.lang.String versionId)
      • setWasLoadingRequest

        public void setWasLoadingRequest(boolean wasLoadingRequest)
      • setAppEngineRelease

        public void setAppEngineRelease(java.lang.String appEngineRelease)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object

Send feedback about...

App Engine standard environment for Java