ErrorContext

A description of the context in which an error occurred. This data should be provided by the application when reporting an error, unless the error report has been generated automatically from Google App Engine logs.

JSON representation
{
  "httpRequest": {
    object(HttpRequestContext)
  },
  "user": string,
  "reportLocation": {
    object(SourceLocation)
  },
}
Fields
httpRequest

object(HttpRequestContext)

The HTTP request which was processed when the error was triggered.

user

string

The user who caused or was affected by the crash. This can be a user ID, an email address, or an arbitrary token that uniquely identifies the user. When sending an error report, leave this field empty if the user was not logged in. In this case the Error Reporting system will use other data, such as remote IP address, to distinguish affected users. See affectedUsersCount in ErrorGroupStats.

reportLocation

object(SourceLocation)

The location in the source code where the decision was made to report the error, usually the place where it was logged. For a logged exception this would be the source line where the exception is logged, usually close to the place where it was caught. This value is in contrast to Exception.cause_location, which describes the source line where the exception was thrown.

HttpRequestContext

HTTP request data that is related to a reported error. This data should be provided by the application when reporting an error, unless the error report has been generated automatically from Google App Engine logs.

JSON representation
{
  "method": string,
  "url": string,
  "userAgent": string,
  "referrer": string,
  "responseStatusCode": number,
  "remoteIp": string,
}
Fields
method

string

The type of HTTP request, such as GET, POST, etc.

url

string

The URL of the request.

userAgent

string

The user agent information that is provided with the request.

referrer

string

The referrer information that is provided with the request.

responseStatusCode

number

The HTTP response status code for the request.

remoteIp

string

The IP address from which the request originated. This can be IPv4, IPv6, or a token which is derived from the IP address, depending on the data that has been provided in the error report.

SourceLocation

Indicates a location in the source code of the service for which errors are reported. functionName must be provided by the application when reporting an error, unless the error report contains a message with a supported exception stack trace. All fields are optional for the later case.

JSON representation
{
  "filePath": string,
  "lineNumber": number,
  "functionName": string,
}
Fields
filePath

string

The source code filename, which can include a truncated relative path, or a full path from a production machine.

lineNumber

number

1-based. 0 indicates that the line number is unknown.

functionName

string

Human-readable name of a function or method. The value can include optional context like the class or package name. For example, my.package.MyClass.method in case of Java.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Stackdriver Error Reporting