As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Errorreporting v1beta1 API

class google.cloud.errorreporting_v1beta1.types.DeleteEventsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Deletes all events in the project.

project_name

Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID}, where {projectID} is the Google Cloud Platform project ID.

Example: projects/my-project-123.

Type

str

class google.cloud.errorreporting_v1beta1.types.DeleteEventsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for deleting error events.

class google.cloud.errorreporting_v1beta1.types.ErrorContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

http_request

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

Type

google.cloud.errorreporting_v1beta1.types.HttpRequestContext

user

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 affected_users_count in ErrorGroupStats.

Type

str

report_location

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.

Type

google.cloud.errorreporting_v1beta1.types.SourceLocation

class google.cloud.errorreporting_v1beta1.types.ErrorEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An error event which is returned by the Error Reporting system.

event_time

Time when the event occurred as provided in the error report. If the report did not contain a timestamp, the time the error was received by the Error Reporting system is used.

Type

google.protobuf.timestamp_pb2.Timestamp

service_context

The ServiceContext for which this error was reported.

Type

google.cloud.errorreporting_v1beta1.types.ServiceContext

message

The stack trace that was reported or logged by the service.

Type

str

context

Data about the context in which the error occurred.

Type

google.cloud.errorreporting_v1beta1.types.ErrorContext

class google.cloud.errorreporting_v1beta1.types.ErrorGroup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Description of a group of similar error events.

name

The group resource name. Example: <code>projects/my- project-123/groups/CNSgkpnppqKCUw</code>

Type

str

group_id

Group IDs are unique for a given project. If the same kind of error occurs in different service contexts, it will receive the same group ID.

Type

str

tracking_issues

Associated tracking issues.

Type

Sequence[google.cloud.errorreporting_v1beta1.types.TrackingIssue]

resolution_status

Error group’s resolution status. An unspecified resolution status will be interpreted as OPEN

Type

google.cloud.errorreporting_v1beta1.types.ResolutionStatus

class google.cloud.errorreporting_v1beta1.types.ErrorGroupOrder(value)[source]

Bases: proto.enums.Enum

A sorting order of error groups.

AFFECTED_USERS_DESC = 4
COUNT_DESC = 1
CREATED_DESC = 3
GROUP_ORDER_UNSPECIFIED = 0
LAST_SEEN_DESC = 2
class google.cloud.errorreporting_v1beta1.types.ErrorGroupStats(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data extracted for a specific group based on certain filter criteria, such as a given time period and/or service filter.

group

Group data that is independent of the filter criteria.

Type

google.cloud.errorreporting_v1beta1.types.ErrorGroup

count

Approximate total number of events in the given group that match the filter criteria.

Type

int

affected_users_count

Approximate number of affected users in the given group that match the filter criteria. Users are distinguished by data in the ErrorContext of the individual error events, such as their login name or their remote IP address in case of HTTP requests. The number of affected users can be zero even if the number of errors is non-zero if no data was provided from which the affected user could be deduced. Users are counted based on data in the request context that was provided in the error report. If more users are implicitly affected, such as due to a crash of the whole service, this is not reflected here.

Type

int

timed_counts

Approximate number of occurrences over time. Timed counts returned by ListGroups are guaranteed to be: - Inside the requested time interval - Non-overlapping, and - Ordered by ascending time.

Type

Sequence[google.cloud.errorreporting_v1beta1.types.TimedCount]

first_seen_time

Approximate first occurrence that was ever seen for this group and which matches the given filter criteria, ignoring the time_range that was specified in the request.

Type

google.protobuf.timestamp_pb2.Timestamp

last_seen_time

Approximate last occurrence that was ever seen for this group and which matches the given filter criteria, ignoring the time_range that was specified in the request.

Type

google.protobuf.timestamp_pb2.Timestamp

affected_services

Service contexts with a non-zero error count for the given filter criteria. This list can be truncated if multiple services are affected. Refer to num_affected_services for the total count.

Type

Sequence[google.cloud.errorreporting_v1beta1.types.ServiceContext]

num_affected_services

The total number of services with a non-zero error count for the given filter criteria.

Type

int

representative

An arbitrary event that is chosen as representative for the whole group. The representative event is intended to be used as a quick preview for the whole group. Events in the group are usually sufficiently similar to each other such that showing an arbitrary representative provides insight into the characteristics of the group as a whole.

Type

google.cloud.errorreporting_v1beta1.types.ErrorEvent

class google.cloud.errorreporting_v1beta1.types.GetGroupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A request to return an individual group.

group_name

Required. The group resource name. Written as projects/{projectID}/groups/{group_name}. Call `groupStats.list <https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list>`__ to return a list of groups belonging to this project.

Example: projects/my-project-123/groups/my-group

Type

str

class google.cloud.errorreporting_v1beta1.types.HttpRequestContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

method

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

Type

str

url

The URL of the request.

Type

str

user_agent

The user agent information that is provided with the request.

Type

str

referrer

The referrer information that is provided with the request.

Type

str

response_status_code

The HTTP response status code for the request.

Type

int

remote_ip

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.

Type

str

class google.cloud.errorreporting_v1beta1.types.ListEventsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Specifies a set of error events to return.

project_name

Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID}, where {projectID} is the Google Cloud Platform project ID.

Example: projects/my-project-123.

Type

str

group_id

Required. The group for which events shall be returned.

Type

str

service_filter

Optional. List only ErrorGroups which belong to a service context that matches the filter. Data for all service contexts is returned if this field is not specified.

Type

google.cloud.errorreporting_v1beta1.types.ServiceContextFilter

time_range

Optional. List only data for the given time range. If not set a default time range is used. The field time_range_begin in the response will specify the beginning of this time range.

Type

google.cloud.errorreporting_v1beta1.types.QueryTimeRange

page_size

Optional. The maximum number of results to return per response.

Type

int

page_token

Optional. A next_page_token provided by a previous response.

Type

str

class google.cloud.errorreporting_v1beta1.types.ListEventsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Contains a set of requested error events.

error_events

The error events which match the given request.

Type

Sequence[google.cloud.errorreporting_v1beta1.types.ErrorEvent]

next_page_token

If non-empty, more results are available. Pass this token, along with the same query parameters as the first request, to view the next page of results.

Type

str

time_range_begin

The timestamp specifies the start time to which the request was restricted.

Type

google.protobuf.timestamp_pb2.Timestamp

property raw_page
class google.cloud.errorreporting_v1beta1.types.ListGroupStatsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Specifies a set of ErrorGroupStats to return.

project_name

Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID} or projects/{projectNumber}, where {projectID} and {projectNumber} can be found in the Google Cloud Console.

Examples: projects/my-project-123, projects/5551234.

Type

str

group_id

Optional. List all <code>ErrorGroupStats</code> with these IDs.

Type

Sequence[str]

service_filter

Optional. List only <code>ErrorGroupStats</code> which belong to a service context that matches the filter. Data for all service contexts is returned if this field is not specified.

Type

google.cloud.errorreporting_v1beta1.types.ServiceContextFilter

time_range

Optional. List data for the given time range. If not set, a default time range is used. The field time_range_begin in the response will specify the beginning of this time range. Only ErrorGroupStats with a non-zero count in the given time range are returned, unless the request contains an explicit group_id list. If a group_id list is given, also ErrorGroupStats with zero occurrences are returned.

Type

google.cloud.errorreporting_v1beta1.types.QueryTimeRange

timed_count_duration

Optional. The preferred duration for a single returned TimedCount. If not set, no timed counts are returned.

Type

google.protobuf.duration_pb2.Duration

alignment

Optional. The alignment of the timed counts to be returned. Default is ALIGNMENT_EQUAL_AT_END.

Type

google.cloud.errorreporting_v1beta1.types.TimedCountAlignment

alignment_time

Optional. Time where the timed counts shall be aligned if rounded alignment is chosen. Default is 00:00 UTC.

Type

google.protobuf.timestamp_pb2.Timestamp

order

Optional. The sort order in which the results are returned. Default is COUNT_DESC.

Type

google.cloud.errorreporting_v1beta1.types.ErrorGroupOrder

page_size

Optional. The maximum number of results to return per response. Default is 20.

Type

int

page_token

Optional. A next_page_token provided by a previous response. To view additional results, pass this token along with the identical query parameters as the first request.

Type

str

class google.cloud.errorreporting_v1beta1.types.ListGroupStatsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Contains a set of requested error group stats.

error_group_stats

The error group stats which match the given request.

Type

Sequence[google.cloud.errorreporting_v1beta1.types.ErrorGroupStats]

next_page_token

If non-empty, more results are available. Pass this token, along with the same query parameters as the first request, to view the next page of results.

Type

str

time_range_begin

The timestamp specifies the start time to which the request was restricted. The start time is set based on the requested time range. It may be adjusted to a later time if a project has exceeded the storage quota and older data has been deleted.

Type

google.protobuf.timestamp_pb2.Timestamp

property raw_page
class google.cloud.errorreporting_v1beta1.types.QueryTimeRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Requests might be rejected or the resulting timed count durations might be adjusted for lower durations.

period

Restricts the query to the specified time range.

Type

google.cloud.errorreporting_v1beta1.types.QueryTimeRange.Period

class Period(value)[source]

Bases: proto.enums.Enum

The supported time ranges.

PERIOD_1_DAY = 3
PERIOD_1_HOUR = 1
PERIOD_1_WEEK = 4
PERIOD_30_DAYS = 5
PERIOD_6_HOURS = 2
PERIOD_UNSPECIFIED = 0
class google.cloud.errorreporting_v1beta1.types.ReportErrorEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A request for reporting an individual error event.

project_name

Required. The resource name of the Google Cloud Platform project. Written as projects/{projectId}, where {projectId} is the Google Cloud Platform project ID.

Example: // projects/my-project-123.

Type

str

event

Required. The error event to be reported.

Type

google.cloud.errorreporting_v1beta1.types.ReportedErrorEvent

class google.cloud.errorreporting_v1beta1.types.ReportErrorEventResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for reporting an individual error event. Data may be added to this message in the future.

class google.cloud.errorreporting_v1beta1.types.ReportedErrorEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An error event which is reported to the Error Reporting system.

event_time

Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system will be used.

Type

google.protobuf.timestamp_pb2.Timestamp

service_context

Required. The service context in which this error has occurred.

Type

google.cloud.errorreporting_v1beta1.types.ServiceContext

message

Required. The error message. If no context.reportLocation is provided, the message must contain a header (typically consisting of the exception type name and an error message) and an exception stack trace in one of the supported programming languages and formats. Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. Supported stack trace formats are:

Type

str

context

Optional. A description of the context in which the error occurred.

Type

google.cloud.errorreporting_v1beta1.types.ErrorContext

class google.cloud.errorreporting_v1beta1.types.ResolutionStatus(value)[source]

Bases: proto.enums.Enum

Resolution status of an error group.

ACKNOWLEDGED = 2
MUTED = 4
OPEN = 1
RESOLUTION_STATUS_UNSPECIFIED = 0
RESOLVED = 3
class google.cloud.errorreporting_v1beta1.types.ServiceContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes a running service that sends errors. Its version changes over time and multiple versions can run in parallel.

service

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed.

Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

Type

str

version

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

Type

str

resource_type

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

Type

str

class google.cloud.errorreporting_v1beta1.types.ServiceContextFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Specifies criteria for filtering a subset of service contexts. The fields in the filter correspond to the fields in ServiceContext. Only exact, case-sensitive matches are supported. If a field is unset or empty, it matches arbitrary values.

service

Optional. The exact value to match against `ServiceContext.service </error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service>`__.

Type

str

version

Optional. The exact value to match against `ServiceContext.version </error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version>`__.

Type

str

resource_type

Optional. The exact value to match against `ServiceContext.resource_type </error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type>`__.

Type

str

class google.cloud.errorreporting_v1beta1.types.SourceLocation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

file_path

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

Type

str

line_number

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

Type

int

function_name

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.

Type

str

class google.cloud.errorreporting_v1beta1.types.TimedCount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The number of errors in a given time period. All numbers are approximate since the error events are sampled before counting them.

count

Approximate number of occurrences in the given time period.

Type

int

start_time

Start of the time period to which count refers (included).

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

End of the time period to which count refers (excluded).

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.errorreporting_v1beta1.types.TimedCountAlignment(value)[source]

Bases: proto.enums.Enum

Specifies how the time periods of error group counts are aligned.

ALIGNMENT_EQUAL_AT_END = 2
ALIGNMENT_EQUAL_ROUNDED = 1
ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0
class google.cloud.errorreporting_v1beta1.types.TrackingIssue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information related to tracking the progress on resolving the error.

url

A URL pointing to a related entry in an issue tracking system. Example: https://github.com/user/project/issues/4

Type

str

class google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A request to replace the existing data for the given group.

group

Required. The group which replaces the resource on the server.

Type

google.cloud.errorreporting_v1beta1.types.ErrorGroup