Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.
Synopsis
- cloudErrorReportingService :: ServiceConfig
- cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
- type CloudErrorReportingAPI = ProjectsGroupsGetResource :<|> (ProjectsGroupsUpdateResource :<|> (ProjectsGroupStatsListResource :<|> (ProjectsEventsListResource :<|> (ProjectsEventsReportResource :<|> ProjectsDeleteEventsResource))))
- module Network.Google.Resource.CloudErrorReporting.Projects.DeleteEvents
- module Network.Google.Resource.CloudErrorReporting.Projects.Events.List
- module Network.Google.Resource.CloudErrorReporting.Projects.Events.Report
- module Network.Google.Resource.CloudErrorReporting.Projects.GroupStats.List
- module Network.Google.Resource.CloudErrorReporting.Projects.Groups.Get
- module Network.Google.Resource.CloudErrorReporting.Projects.Groups.Update
- data ErrorEvent
- errorEvent :: ErrorEvent
- eeContext :: Lens' ErrorEvent (Maybe ErrorContext)
- eeEventTime :: Lens' ErrorEvent (Maybe UTCTime)
- eeServiceContext :: Lens' ErrorEvent (Maybe ServiceContext)
- eeMessage :: Lens' ErrorEvent (Maybe Text)
- data ErrorContext
- errorContext :: ErrorContext
- ecHTTPRequest :: Lens' ErrorContext (Maybe HTTPRequestContext)
- ecUser :: Lens' ErrorContext (Maybe Text)
- ecSourceReferences :: Lens' ErrorContext [SourceReference]
- ecReportLocation :: Lens' ErrorContext (Maybe SourceLocation)
- data ErrorGroup
- errorGroup :: ErrorGroup
- egTrackingIssues :: Lens' ErrorGroup [TrackingIssue]
- egName :: Lens' ErrorGroup (Maybe Text)
- egGroupId :: Lens' ErrorGroup (Maybe Text)
- data DeleteEventsResponse
- deleteEventsResponse :: DeleteEventsResponse
- data ReportedErrorEvent
- reportedErrorEvent :: ReportedErrorEvent
- reeContext :: Lens' ReportedErrorEvent (Maybe ErrorContext)
- reeEventTime :: Lens' ReportedErrorEvent (Maybe UTCTime)
- reeServiceContext :: Lens' ReportedErrorEvent (Maybe ServiceContext)
- reeMessage :: Lens' ReportedErrorEvent (Maybe Text)
- data HTTPRequestContext
- hTTPRequestContext :: HTTPRequestContext
- httprcRemoteIP :: Lens' HTTPRequestContext (Maybe Text)
- httprcURL :: Lens' HTTPRequestContext (Maybe Text)
- httprcReferrer :: Lens' HTTPRequestContext (Maybe Text)
- httprcMethod :: Lens' HTTPRequestContext (Maybe Text)
- httprcResponseStatusCode :: Lens' HTTPRequestContext (Maybe Int32)
- httprcUserAgent :: Lens' HTTPRequestContext (Maybe Text)
- data TrackingIssue
- trackingIssue :: TrackingIssue
- tiURL :: Lens' TrackingIssue (Maybe Text)
- data ListEventsResponse
- listEventsResponse :: ListEventsResponse
- lerNextPageToken :: Lens' ListEventsResponse (Maybe Text)
- lerTimeRangeBegin :: Lens' ListEventsResponse (Maybe UTCTime)
- lerErrorEvents :: Lens' ListEventsResponse [ErrorEvent]
- data ErrorGroupStats
- errorGroupStats :: ErrorGroupStats
- egsAffectedServices :: Lens' ErrorGroupStats [ServiceContext]
- egsGroup :: Lens' ErrorGroupStats (Maybe ErrorGroup)
- egsFirstSeenTime :: Lens' ErrorGroupStats (Maybe UTCTime)
- egsAffectedUsersCount :: Lens' ErrorGroupStats (Maybe Int64)
- egsCount :: Lens' ErrorGroupStats (Maybe Int64)
- egsTimedCounts :: Lens' ErrorGroupStats [TimedCount]
- egsNumAffectedServices :: Lens' ErrorGroupStats (Maybe Int32)
- egsLastSeenTime :: Lens' ErrorGroupStats (Maybe UTCTime)
- egsRepresentative :: Lens' ErrorGroupStats (Maybe ErrorEvent)
- data ListGroupStatsResponse
- listGroupStatsResponse :: ListGroupStatsResponse
- lgsrNextPageToken :: Lens' ListGroupStatsResponse (Maybe Text)
- lgsrTimeRangeBegin :: Lens' ListGroupStatsResponse (Maybe UTCTime)
- lgsrErrorGroupStats :: Lens' ListGroupStatsResponse [ErrorGroupStats]
- data ServiceContext
- serviceContext :: ServiceContext
- scResourceType :: Lens' ServiceContext (Maybe Text)
- scService :: Lens' ServiceContext (Maybe Text)
- scVersion :: Lens' ServiceContext (Maybe Text)
- data Xgafv
- data TimedCount
- timedCount :: TimedCount
- tcStartTime :: Lens' TimedCount (Maybe UTCTime)
- tcCount :: Lens' TimedCount (Maybe Int64)
- tcEndTime :: Lens' TimedCount (Maybe UTCTime)
- data SourceLocation
- sourceLocation :: SourceLocation
- slLineNumber :: Lens' SourceLocation (Maybe Int32)
- slFilePath :: Lens' SourceLocation (Maybe Text)
- slFunctionName :: Lens' SourceLocation (Maybe Text)
- data SourceReference
- sourceReference :: SourceReference
- srRepository :: Lens' SourceReference (Maybe Text)
- srRevisionId :: Lens' SourceReference (Maybe Text)
- data ReportErrorEventResponse
- reportErrorEventResponse :: ReportErrorEventResponse
Service Configuration
cloudErrorReportingService :: ServiceConfig Source #
Default request referring to version v1beta1
of the Stackdriver Error Reporting API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] Source #
View and manage your data across Google Cloud Platform services
API Declaration
type CloudErrorReportingAPI = ProjectsGroupsGetResource :<|> (ProjectsGroupsUpdateResource :<|> (ProjectsGroupStatsListResource :<|> (ProjectsEventsListResource :<|> (ProjectsEventsReportResource :<|> ProjectsDeleteEventsResource)))) Source #
Represents the entirety of the methods and resources available for the Stackdriver Error Reporting API service.
Resources
clouderrorreporting.projects.deleteEvents
clouderrorreporting.projects.events.list
clouderrorreporting.projects.events.report
clouderrorreporting.projects.groupStats.list
clouderrorreporting.projects.groups.get
clouderrorreporting.projects.groups.update
Types
ErrorEvent
data ErrorEvent Source #
An error event which is returned by the Error Reporting system.
See: errorEvent
smart constructor.
Instances
errorEvent :: ErrorEvent Source #
Creates a value of ErrorEvent
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eeContext :: Lens' ErrorEvent (Maybe ErrorContext) Source #
Data about the context in which the error occurred.
eeEventTime :: Lens' ErrorEvent (Maybe UTCTime) Source #
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.
eeServiceContext :: Lens' ErrorEvent (Maybe ServiceContext) Source #
The `ServiceContext` for which this error was reported.
eeMessage :: Lens' ErrorEvent (Maybe Text) Source #
The stack trace that was reported or logged by the service.
ErrorContext
data ErrorContext Source #
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.
See: errorContext
smart constructor.
Instances
errorContext :: ErrorContext Source #
Creates a value of ErrorContext
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ecHTTPRequest :: Lens' ErrorContext (Maybe HTTPRequestContext) Source #
The HTTP request which was processed when the error was triggered.
ecUser :: Lens' ErrorContext (Maybe Text) Source #
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`.
ecSourceReferences :: Lens' ErrorContext [SourceReference] Source #
Source code that was used to build the executable which has caused the given error message.
ecReportLocation :: Lens' ErrorContext (Maybe SourceLocation) Source #
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.
ErrorGroup
data ErrorGroup Source #
Description of a group of similar error events.
See: errorGroup
smart constructor.
Instances
errorGroup :: ErrorGroup Source #
Creates a value of ErrorGroup
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
egTrackingIssues :: Lens' ErrorGroup [TrackingIssue] Source #
Associated tracking issues.
egName :: Lens' ErrorGroup (Maybe Text) Source #
The group resource name. Example: 'projects\/my-project-123\/groups\/my-groupid'
egGroupId :: Lens' ErrorGroup (Maybe Text) Source #
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.
DeleteEventsResponse
data DeleteEventsResponse Source #
Response message for deleting error events.
See: deleteEventsResponse
smart constructor.
Instances
deleteEventsResponse :: DeleteEventsResponse Source #
Creates a value of DeleteEventsResponse
with the minimum fields required to make a request.
ReportedErrorEvent
data ReportedErrorEvent Source #
An error event which is reported to the Error Reporting system.
See: reportedErrorEvent
smart constructor.
Instances
reportedErrorEvent :: ReportedErrorEvent Source #
Creates a value of ReportedErrorEvent
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
reeContext :: Lens' ReportedErrorEvent (Maybe ErrorContext) Source #
- Optional
- A description of the context in which the error occurred.
reeEventTime :: Lens' ReportedErrorEvent (Maybe UTCTime) Source #
- Optional
- Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system will be used.
reeServiceContext :: Lens' ReportedErrorEvent (Maybe ServiceContext) Source #
- Required
- The service context in which this error has occurred.
reeMessage :: Lens' ReportedErrorEvent (Maybe Text) Source #
- 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: * **Java**: Must be the return value of
- `Throwable.printStackTrace()`
- (https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). * **Python**: Must be the return value of
- `traceback.format_exc()`
- (https://docs.python.org/2/library/traceback.html#traceback.format_exc). * **JavaScript**: Must be the value of
- `error.stack`
- (https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8. * **Ruby**: Must contain frames returned by
- `Exception.backtrace`
- (https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). * **C#**: Must be the return value of
- `Exception.ToString()`
- (https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` and contain the result of
- `(string)$exception`
- (http://php.net/manual/en/exception.tostring.php). * **Go**: Must be the return value of
- `runtime.Stack()`
- (https://golang.org/pkg/runtime/debug/#Stack).
HTTPRequestContext
data HTTPRequestContext Source #
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.
See: hTTPRequestContext
smart constructor.
Instances
hTTPRequestContext :: HTTPRequestContext Source #
Creates a value of HTTPRequestContext
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
httprcRemoteIP :: Lens' HTTPRequestContext (Maybe Text) Source #
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.
httprcReferrer :: Lens' HTTPRequestContext (Maybe Text) Source #
The referrer information that is provided with the request.
httprcMethod :: Lens' HTTPRequestContext (Maybe Text) Source #
The type of HTTP request, such as `GET`, `POST`, etc.
httprcResponseStatusCode :: Lens' HTTPRequestContext (Maybe Int32) Source #
The HTTP response status code for the request.
httprcUserAgent :: Lens' HTTPRequestContext (Maybe Text) Source #
The user agent information that is provided with the request.
TrackingIssue
data TrackingIssue Source #
Information related to tracking the progress on resolving the error.
See: trackingIssue
smart constructor.
Instances
trackingIssue :: TrackingIssue Source #
Creates a value of TrackingIssue
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tiURL :: Lens' TrackingIssue (Maybe Text) Source #
A URL pointing to a related entry in an issue tracking system. Example: https://github.com/user/project/issues/4
ListEventsResponse
data ListEventsResponse Source #
Contains a set of requested error events.
See: listEventsResponse
smart constructor.
Instances
listEventsResponse :: ListEventsResponse Source #
Creates a value of ListEventsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lerNextPageToken :: Lens' ListEventsResponse (Maybe Text) Source #
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.
lerTimeRangeBegin :: Lens' ListEventsResponse (Maybe UTCTime) Source #
The timestamp specifies the start time to which the request was restricted.
lerErrorEvents :: Lens' ListEventsResponse [ErrorEvent] Source #
The error events which match the given request.
ErrorGroupStats
data ErrorGroupStats Source #
Data extracted for a specific group based on certain filter criteria, such as a given time period and/or service filter.
See: errorGroupStats
smart constructor.
Instances
errorGroupStats :: ErrorGroupStats Source #
Creates a value of ErrorGroupStats
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
egsAffectedServices :: Lens' ErrorGroupStats [ServiceContext] Source #
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.
egsGroup :: Lens' ErrorGroupStats (Maybe ErrorGroup) Source #
Group data that is independent of the filter criteria.
egsFirstSeenTime :: Lens' ErrorGroupStats (Maybe UTCTime) Source #
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.
egsAffectedUsersCount :: Lens' ErrorGroupStats (Maybe Int64) Source #
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.
egsCount :: Lens' ErrorGroupStats (Maybe Int64) Source #
Approximate total number of events in the given group that match the filter criteria.
egsTimedCounts :: Lens' ErrorGroupStats [TimedCount] Source #
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.
egsNumAffectedServices :: Lens' ErrorGroupStats (Maybe Int32) Source #
The total number of services with a non-zero error count for the given filter criteria.
egsLastSeenTime :: Lens' ErrorGroupStats (Maybe UTCTime) Source #
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.
egsRepresentative :: Lens' ErrorGroupStats (Maybe ErrorEvent) Source #
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.
ListGroupStatsResponse
data ListGroupStatsResponse Source #
Contains a set of requested error group stats.
See: listGroupStatsResponse
smart constructor.
Instances
listGroupStatsResponse :: ListGroupStatsResponse Source #
Creates a value of ListGroupStatsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lgsrNextPageToken :: Lens' ListGroupStatsResponse (Maybe Text) Source #
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.
lgsrTimeRangeBegin :: Lens' ListGroupStatsResponse (Maybe UTCTime) Source #
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.
lgsrErrorGroupStats :: Lens' ListGroupStatsResponse [ErrorGroupStats] Source #
The error group stats which match the given request.
ServiceContext
data ServiceContext Source #
Describes a running service that sends errors. Its version changes over time and multiple versions can run in parallel.
See: serviceContext
smart constructor.
Instances
serviceContext :: ServiceContext Source #
Creates a value of ServiceContext
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
scResourceType :: Lens' ServiceContext (Maybe Text) Source #
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.
scService :: Lens' ServiceContext (Maybe Text) Source #
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.
scVersion :: Lens' ServiceContext (Maybe Text) Source #
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.
Xgafv
V1 error format.
Instances
TimedCount
data TimedCount Source #
The number of errors in a given time period. All numbers are approximate since the error events are sampled before counting them.
See: timedCount
smart constructor.
Instances
timedCount :: TimedCount Source #
Creates a value of TimedCount
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tcStartTime :: Lens' TimedCount (Maybe UTCTime) Source #
Start of the time period to which `count` refers (included).
tcCount :: Lens' TimedCount (Maybe Int64) Source #
Approximate number of occurrences in the given time period.
tcEndTime :: Lens' TimedCount (Maybe UTCTime) Source #
End of the time period to which `count` refers (excluded).
SourceLocation
data SourceLocation Source #
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.
See: sourceLocation
smart constructor.
Instances
sourceLocation :: SourceLocation Source #
Creates a value of SourceLocation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
slLineNumber :: Lens' SourceLocation (Maybe Int32) Source #
1-based. 0 indicates that the line number is unknown.
slFilePath :: Lens' SourceLocation (Maybe Text) Source #
The source code filename, which can include a truncated relative path, or a full path from a production machine.
slFunctionName :: Lens' SourceLocation (Maybe Text) Source #
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.
SourceReference
data SourceReference Source #
A reference to a particular snapshot of the source tree used to build and deploy an application.
See: sourceReference
smart constructor.
Instances
sourceReference :: SourceReference Source #
Creates a value of SourceReference
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
srRepository :: Lens' SourceReference (Maybe Text) Source #
Optional. A URI string identifying the repository. Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
srRevisionId :: Lens' SourceReference (Maybe Text) Source #
The canonical and persistent identifier of the deployed revision. Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
ReportErrorEventResponse
data ReportErrorEventResponse Source #
Response for reporting an individual error event. Data may be added to this message in the future.
See: reportErrorEventResponse
smart constructor.
Instances
reportErrorEventResponse :: ReportErrorEventResponse Source #
Creates a value of ReportErrorEventResponse
with the minimum fields required to make a request.