Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 3.3 KB

File metadata and controls

101 lines (70 loc) · 3.3 KB

Python Client for Stackdriver Error Reporting API (Alpha)

Stackdriver Error Reporting API: Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors.

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Stackdriver Error Reporting API.
  4. Setup Authentication.

Installation

Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.

With virtualenv, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.

Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-error-reporting

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-error-reporting

Preview

ReportErrorsServiceClient

from google.cloud import errorreporting_v1beta1

client = errorreporting_v1beta1.ReportErrorsServiceClient()

project_name = client.project_path('[PROJECT]')
event = {}

response = client.report_error_event(project_name, event)

Next Steps

Api Reference

.. toctree::
    :maxdepth: 2

    gapic/v1beta1/api
    gapic/v1beta1/types