|
| 1 | +// Copyright 2016 Google Inc. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.devtools.clouderrorreporting.v1beta1; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/monitored_resource.proto"; |
| 21 | +import "google/protobuf/timestamp.proto"; |
| 22 | + |
| 23 | +option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1"; |
| 24 | +option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting"; |
| 25 | +option java_multiple_files = true; |
| 26 | +option java_outer_classname = "CommonProto"; |
| 27 | +option java_package = "com.google.devtools.clouderrorreporting.v1beta1"; |
| 28 | +option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1"; |
| 29 | + |
| 30 | + |
| 31 | +// Description of a group of similar error events. |
| 32 | +message ErrorGroup { |
| 33 | + // The group resource name. |
| 34 | + // Example: <code>projects/my-project-123/groups/my-groupid</code> |
| 35 | + string name = 1; |
| 36 | + |
| 37 | + // Group IDs are unique for a given project. If the same kind of error |
| 38 | + // occurs in different service contexts, it will receive the same group ID. |
| 39 | + string group_id = 2; |
| 40 | + |
| 41 | + // Associated tracking issues. |
| 42 | + repeated TrackingIssue tracking_issues = 3; |
| 43 | +} |
| 44 | + |
| 45 | +// Information related to tracking the progress on resolving the error. |
| 46 | +message TrackingIssue { |
| 47 | + // A URL pointing to a related entry in an issue tracking system. |
| 48 | + // Example: https://github.com/user/project/issues/4 |
| 49 | + string url = 1; |
| 50 | +} |
| 51 | + |
| 52 | +// An error event which is returned by the Error Reporting system. |
| 53 | +message ErrorEvent { |
| 54 | + // Time when the event occurred as provided in the error report. |
| 55 | + // If the report did not contain a timestamp, the time the error was received |
| 56 | + // by the Error Reporting system is used. |
| 57 | + google.protobuf.Timestamp event_time = 1; |
| 58 | + |
| 59 | + // The `ServiceContext` for which this error was reported. |
| 60 | + ServiceContext service_context = 2; |
| 61 | + |
| 62 | + // The stack trace that was reported or logged by the service. |
| 63 | + string message = 3; |
| 64 | + |
| 65 | + // Data about the context in which the error occurred. |
| 66 | + ErrorContext context = 5; |
| 67 | +} |
| 68 | + |
| 69 | +// Describes a running service that sends errors. |
| 70 | +// Its version changes over time and multiple versions can run in parallel. |
| 71 | +message ServiceContext { |
| 72 | + // An identifier of the service, such as the name of the |
| 73 | + // executable, job, or Google App Engine service name. This field is expected |
| 74 | + // to have a low number of values that are relatively stable over time, as |
| 75 | + // opposed to `version`, which can be changed whenever new code is deployed. |
| 76 | + // |
| 77 | + // Contains the service name for error reports extracted from Google |
| 78 | + // App Engine logs or `default` if the App Engine default service is used. |
| 79 | + string service = 2; |
| 80 | + |
| 81 | + // Represents the source code version that the developer provided, |
| 82 | + // which could represent a version label or a Git SHA-1 hash, for example. |
| 83 | + string version = 3; |
| 84 | + |
| 85 | + // Type of the MonitoredResource. List of possible values: |
| 86 | + // https://cloud.google.com/monitoring/api/resources |
| 87 | + // |
| 88 | + // Value is set automatically for incoming errors and must not be set when |
| 89 | + // reporting errors. |
| 90 | + string resource_type = 4; |
| 91 | +} |
| 92 | + |
| 93 | +// A description of the context in which an error occurred. |
| 94 | +// This data should be provided by the application when reporting an error, |
| 95 | +// unless the |
| 96 | +// error report has been generated automatically from Google App Engine logs. |
| 97 | +message ErrorContext { |
| 98 | + // The HTTP request which was processed when the error was |
| 99 | + // triggered. |
| 100 | + HttpRequestContext http_request = 1; |
| 101 | + |
| 102 | + // The user who caused or was affected by the crash. |
| 103 | + // This can be a user ID, an email address, or an arbitrary token that |
| 104 | + // uniquely identifies the user. |
| 105 | + // When sending an error report, leave this field empty if the user was not |
| 106 | + // logged in. In this case the |
| 107 | + // Error Reporting system will use other data, such as remote IP address, to |
| 108 | + // distinguish affected users. See `affected_users_count` in |
| 109 | + // `ErrorGroupStats`. |
| 110 | + string user = 2; |
| 111 | + |
| 112 | + // The location in the source code where the decision was made to |
| 113 | + // report the error, usually the place where it was logged. |
| 114 | + // For a logged exception this would be the source line where the |
| 115 | + // exception is logged, usually close to the place where it was |
| 116 | + // caught. This value is in contrast to `Exception.cause_location`, |
| 117 | + // which describes the source line where the exception was thrown. |
| 118 | + SourceLocation report_location = 3; |
| 119 | +} |
| 120 | + |
| 121 | +// HTTP request data that is related to a reported error. |
| 122 | +// This data should be provided by the application when reporting an error, |
| 123 | +// unless the |
| 124 | +// error report has been generated automatically from Google App Engine logs. |
| 125 | +message HttpRequestContext { |
| 126 | + // The type of HTTP request, such as `GET`, `POST`, etc. |
| 127 | + string method = 1; |
| 128 | + |
| 129 | + // The URL of the request. |
| 130 | + string url = 2; |
| 131 | + |
| 132 | + // The user agent information that is provided with the request. |
| 133 | + string user_agent = 3; |
| 134 | + |
| 135 | + // The referrer information that is provided with the request. |
| 136 | + string referrer = 4; |
| 137 | + |
| 138 | + // The HTTP response status code for the request. |
| 139 | + int32 response_status_code = 5; |
| 140 | + |
| 141 | + // The IP address from which the request originated. |
| 142 | + // This can be IPv4, IPv6, or a token which is derived from the |
| 143 | + // IP address, depending on the data that has been provided |
| 144 | + // in the error report. |
| 145 | + string remote_ip = 6; |
| 146 | +} |
| 147 | + |
| 148 | +// Indicates a location in the source code of the service for which |
| 149 | +// errors are reported. |
| 150 | +// This data should be provided by the application when reporting an error, |
| 151 | +// unless the error report has been generated automatically from Google App |
| 152 | +// Engine logs. All fields are optional. |
| 153 | +message SourceLocation { |
| 154 | + // The source code filename, which can include a truncated relative |
| 155 | + // path, or a full path from a production machine. |
| 156 | + string file_path = 1; |
| 157 | + |
| 158 | + // 1-based. 0 indicates that the line number is unknown. |
| 159 | + int32 line_number = 2; |
| 160 | + |
| 161 | + // Human-readable name of a function or method. |
| 162 | + // The value can include optional context like the class or package name. |
| 163 | + // For example, `my.package.MyClass.method` in case of Java. |
| 164 | + string function_name = 4; |
| 165 | +} |
0 commit comments