Overview

The Stackdriver Error Reporting API provides:

  • A simple endpoint to report errors from your running service.
  • Read access to error groups and their associated errors.

Getting started

{% dynamic if "no_credentials" in setvar.task_params %}{% dynamic setvar credential_type %}NO_AUTH{% dynamic endsetvar %}{% dynamic if not setvar.redirect_url %}{% dynamic setvar redirect_url %}https://console.cloud.google.com{% dynamic endsetvar %}{% dynamic endif %}{% dynamic endif %}{% dynamic if setvar.in_henhouse_no_auth_whitelist %}{% dynamic if not setvar.credential_type %}{% dynamic setvar credential_type %}NO_AUTH{% dynamic endsetvar %}{% dynamic endif %}{% dynamic elif setvar.in_henhouse_service_account_whitelist %}{% dynamic if not setvar.credential_type %}{% dynamic setvar credential_type %}SERVICE_ACCOUNT{% dynamic endsetvar %}{% dynamic endif %}{% dynamic endif %}{% dynamic if not setvar.service_account_roles and setvar.credential_type == "SERVICE_ACCOUNT" %}{% dynamic setvar service_account_roles %}{% dynamic endsetvar %}{% dynamic endif %}{% dynamic setvar console %}{% dynamic if "no_steps" not in setvar.task_params %}

  • {% dynamic endif %}{% dynamic if setvar.api_list %}{% dynamic if setvar.in_henhouse_no_auth_whitelist or setvar.in_henhouse_service_account_whitelist %}GCP Console プロジェクトをセットアップします。

    プロジェクトをセットアップする

    クリックして、以下を行います。

    • プロジェクトを作成または選択します。
    • プロジェクトに{% dynamic if setvar.api_names %}{% dynamic print setvar.api_names %}{% dynamic else %}必要な{% dynamic endif %}{% dynamic if "," in setvar.api_list %} API{% dynamic elif "API" in setvar.api_names %}{% dynamic else %} API{% dynamic endif %} を有効にします。
    • {% dynamic if setvar.credential_type == 'SERVICE_ACCOUNT' %}
    • サービス アカウントを作成します。
    • JSON として秘密鍵をダウンロードします。
    • {% dynamic endif %}

    これらのリソースは、GCP Console でいつでも表示および管理できます。

    {% dynamic else %}{% dynamic if "no_text" not in setvar.task_params %}{% dynamic if setvar.api_names %}{% dynamic print setvar.api_names %}{% dynamic else %}必要な{% dynamic endif %}{% dynamic if "," in setvar.api_list %} API{% dynamic elif "API" in setvar.api_names %}{% dynamic else %} API{% dynamic endif %} を有効にします。 {% dynamic endif %}

    {% dynamic if "," in setvar.api_list %}API{% dynamic else %}API{% dynamic endif %}を有効にする

    {% dynamic endif %}{% dynamic endif %}{% dynamic if "no_steps" not in setvar.task_params %}
  • {% dynamic endif %}{% dynamic endsetvar %}{% dynamic print setvar.console %}

    Data model

    The Error Reporting API defines three entities: error events, error groups, and error group stats. The error group stats object is the object that most users will interact with most frequently.

    Error events

    An ErrorEvent represents a single occurrence of an error in your application. The object contains information about the error, such as the time at which it occurred, the context in which it occurred, and the error message that was returned.

    Error groups

    ErrorGroup objects are logically-grouped collections of error events. Grouping is based on information in the error event's stack trace. An error group is a simple object containing only the name, group ID, and any associated tracking issues for the group.

    To update tracking issues URLs, use this resource's update method.

    Error group stats

    ErrorGroupStats objects contain detailed information about an error group, and are the API objects that you will interact with most frequently. Information in the groupStats object includes the first and last time an error event in this group occurred, the count, the number of affected users, and more. This object is useful when building widgets and custom dashboards.

    Operations

    The Error Reporting API supports the following operations:

    • Report a new error event
    • List error group stats
    • List error events
    • Get error groups
    • Update an error group's tracking issues

    Report error events

    You can report error events from your running services by writing them to ReportedErrorEvent. Doing this generates properly formatted error messages in Stackdriver Logging. The resulting log name is formatted as projects/<PROJECT_ID>/clouderrorreporting.googleapis.com%2Freported_errors. You might incur minor Stackdriver Logging ingestion costs using this method; to control these costs, review Logs exclusions.

    You can also report new error events to Error Reporting by assembling error event entities from your running service and sending them to the events.report method.

    List error group stats

    To get a list of error group stats, send a request to the groupStats.list method. You can pass one or more query parameters to filter the group stats that are returned.

    List error events

    To get a list of error events belonging to a specific error group, send a request to the events.list method. You can pass a filter condition to these requests to retrieve only those error events that occurred between a specific start and end time, or those that match specific service contexts.

    Get error groups

    To retrieve a specific error group resource, send a request to the groups.get method.

    Update error groups

    To update the tracking issue URLs associated with an error group, send an updated ErrorGroup resource to the groups.update method.

    このページは役立ちましたか?評価をお願いいたします。

    フィードバックを送信...

    Stackdriver Error Reporting
    ご不明な点がありましたら、Google のサポートページをご覧ください。