clouderrorreporting_v1beta1.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. type: google.api.Service
  2. config_version: 3
  3. name: clouderrorreporting.googleapis.com
  4. title: Error Reporting API
  5. apis:
  6. - name: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService
  7. - name: google.devtools.clouderrorreporting.v1beta1.ErrorStatsService
  8. - name: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService
  9. documentation:
  10. summary: |-
  11. Groups and counts similar errors from cloud services and applications,
  12. reports new errors, and provides access to error groups and their
  13. associated errors.
  14. overview: |-
  15. <!-- mdlint off(URL_BAD_G3DOC_PATH) -->
  16. {% include "_shared/apis/console/_local_variables.html" %}
  17. {% include "cloud/_shared/_cloud_shared_files.html" %}
  18. {% dynamic setvar launch_stage %}beta{% dynamic endsetvar %}
  19. {% dynamic include /docs/includes/___info_launch_stage_disclaimer %}
  20. The {{error_reporting_api}} provides:
  21. * A simple
  22. [endpoint](/error-reporting/reference/rest/v1beta1/projects.events/report)
  23. to **report** errors from your running service.
  24. * Read access to error groups and their associated errors.
  25. ## Getting started
  26. {% dynamic setvar api_list %}clouderrorreporting.googleapis.com{% dynamic
  27. endsetvar %} {% dynamic setvar api_names %}{{error_reporting_name}}{%
  28. dynamic endsetvar %} {% dynamic setvar task_params %}no_steps{% dynamic
  29. endsetvar %} {% dynamic include /docs/includes/___enable_api %}
  30. ## Authorizing use of the API
  31. Access to the {{error_reporting_api_short}} is controlled by {{iam_name}}
  32. roles and permissions. You can find out more about authentication and
  33. authorization for {{gcp_name}} APIs in the [Authentication
  34. guide](/docs/authentication/getting-started).
  35. <aside class="note"><b>Note:</b> API keys are associated with a project
  36. for API quota and billing purposes, but they shouldn't be used as an
  37. <a href="/docs/authentication/#authentication_strategies">authentication
  38. mechanism</a> Instead, use <a
  39. href="/docs/authentication/getting-started#creating_a_service_account">service
  40. accounts</a> whenever possible. </aside>
  41. ## Data model
  42. The {{error_reporting_api_short}} defines three entities: error events,
  43. error groups, and error group stats. The [error group
  44. stats](#error-group-stats)
  45. object is the object that most users will interact with most frequently.
  46. ### Error events
  47. An [`ErrorEvent`](/error-reporting/reference/rest/v1beta1/ErrorEvent)
  48. represents a single occurrence of an error in your application. The
  49. object
  50. contains information about the error, such as the time at which it
  51. occurred, the context in which it occurred, and the error message that was
  52. returned.
  53. An error event is guaranteed to be available for at least 30 days after
  54. being generated.
  55. ### Error groups
  56. [`ErrorGroup`](/error-reporting/reference/rest/v1beta1/projects.groups#ErrorGroup) objects
  57. are logically-grouped collections of error events. Grouping is
  58. based on information in the error event's stack trace. An error group is a
  59. simple object containing only the name, group ID, and any associated
  60. tracking issues for the group.
  61. To update tracking issues URLs, use this resource's `update` method.
  62. ### Error group stats
  63. [`ErrorGroupStats`](/error-reporting/reference/rest/v1beta1/projects.groupStats/list#ErrorGroupStats) objects
  64. contain detailed information about an error group,
  65. and are the API objects that you will interact with most frequently.
  66. Information in the `groupStats` object includes the first and last time an
  67. error event in this group occurred, the count, the number of affected
  68. users, and more. This object is useful when building widgets and custom
  69. dashboards.
  70. ## Operations
  71. The {{error_reporting_api_short}} supports the following operations:
  72. * Report a new error event
  73. * List error group stats
  74. * List error events
  75. * Get error groups
  76. * Update an error group's tracking issues
  77. ### Report error events
  78. You can report error events from your running services by writing them to
  79. [`ReportedErrorEvent`](/error-reporting/reference/rest/v1beta1/projects.events/report#ReportedErrorEvent). Doing
  80. this generates
  81. [properly formatted error
  82. messages](/error-reporting/docs/formatting-error-messages) in
  83. {{logging_name}}. The resulting log name is formatted as
  84. `projects/<PROJECT_ID>/clouderrorreporting.googleapis.com%2Freported_errors`. You
  85. might incur minor {{logging_name}} ingestion costs using this method;
  86. to control these costs, review [Logs
  87. exclusions](/logging/docs/exclusions).
  88. You can also report new error events to {{error_reporting_name}} by
  89. assembling [error event
  90. entities](/error-reporting/reference/rest/v1beta1/projects.events/report#ReportedErrorEvent) from
  91. your running service and sending them to the `events.report` method.
  92. ### List error group stats
  93. To get a list of error group stats, send a request to the
  94. [`groupStats.list`](/error-reporting/reference/rest/v1beta1/projects.groupStats/list) method.
  95. You can pass one or more
  96. [query
  97. parameters](/error-reporting/reference/rest/v1beta1/projects.groupStats/list#body.QUERY_PARAMETERS) to
  98. filter the group stats that are returned.
  99. ### List error events
  100. To get a list of error events belonging to a specific error group, send a
  101. request to the
  102. [`events.list`](/error-reporting/reference/rest/v1beta1/projects.events/list) method.
  103. You can pass a filter condition to these requests to retrieve only
  104. those error events that occurred between a specific start and end time, or
  105. those that match specific [service
  106. contexts](/error-reporting/reference/rest/v1beta1/ServiceContextFilter).
  107. ### Get error groups
  108. To retrieve a specific error group resource, send a request to the
  109. [`groups.get`](/error-reporting/reference/rest/v1beta1/projects.groups/get) method. ###
  110. Update error groups
  111. To update the tracking issue URLs associated with an error group, send an
  112. updated
  113. [`ErrorGroup`
  114. resource](/error-reporting/reference/rest/v1beta1/projects.groups#ErrorGroup) to
  115. the
  116. [`groups.update`](/error-reporting/reference/rest/v1beta1/projects.groups/update) method. <!--
  117. mdlint on -->
  118. authentication:
  119. rules:
  120. - selector: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService.GetGroup
  121. oauth:
  122. canonical_scopes: |-
  123. https://www.googleapis.com/auth/cloud-platform
  124. - selector: google.devtools.clouderrorreporting.v1beta1.ErrorGroupService.UpdateGroup
  125. oauth:
  126. canonical_scopes: |-
  127. https://www.googleapis.com/auth/cloud-platform
  128. - selector: 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.*'
  129. oauth:
  130. canonical_scopes: |-
  131. https://www.googleapis.com/auth/cloud-platform
  132. - selector: google.devtools.clouderrorreporting.v1beta1.ReportErrorsService.ReportErrorEvent
  133. oauth:
  134. canonical_scopes: |-
  135. https://www.googleapis.com/auth/cloud-platform