Client for interacting with the Error Reporting API
Classes
Client
Client(project=None, credentials=None, _http=None, service=None, version=None, client_info=<google.api_core.gapic_v1.client_info.ClientInfo object>, client_options=None, _use_grpc=None)
Error Reporting client. Currently Error Reporting is done by creating a Logging client.
Parameters | |
---|---|
Name | Description |
project |
str
the project which the client acts on behalf of. If not passed falls back to the default inferred from the environment. |
credentials |
The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. |
_http |
(Optional) HTTP object to make requests. Can be any object that defines |
service |
str
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. |
version |
str
Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. If the developer did not provide a version, the value is set to default. |
_use_grpc |
bool
(Optional) Explicitly specifies whether to use the gRPC transport or HTTP. If unset, falls back to the |
client_info |
The client info used to send a user-agent string along with API requests. If |
client_options |
(Optional) Client options used to set user options on the client. API Endpoint should be set through client_options. |
Exceptions | |
---|---|
Type | Description |
`ValueError | if the project is neither passed in nor set in the environment. |
HTTPContext
HTTPContext(
method=None,
url=None,
user_agent=None,
referrer=None,
response_status_code=None,
remote_ip=None,
)
HTTPContext defines an object that captures the parameter for the httpRequest part of Error Reporting API
Parameters | |
---|---|
Name | Description |
method |
str
The type of HTTP request, such as GET, POST, etc. |
url |
str
The URL of the request |
user_agent |
str
The user agent information that is provided with the request. |
referrer |
str
The referrer information that is provided with the request. |
response_status_code |
int
The HTTP response status code for the request. |
remote_ip |
str
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. |