-
Notifications
You must be signed in to change notification settings - Fork 29
/
.readme-partials.yaml
35 lines (23 loc) · 2.6 KB
/
.readme-partials.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
introduction: |-
> Node.js idiomatic client for [Error Reporting][product-docs].
[Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
body: |-
This module provides custom Error Reporting support for Node.js applications.
[Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by
applications running in almost any environment.
However, note that [@google-cloud/logging-winston](https://github.com/googleapis/nodejs-logging-winston) and [@google-cloud/logging-bunyan](https://github.com/googleapis/nodejs-logging-bunyan) automatically integrate with the Error Reporting service for Error objects logged at severity `error` or higher, for applications running on Google Cloud Platform.
Thus, if you are already using Winston or Bunyan in your application, and don't need custom error reporting capabilities, you do not need to use the `@google-cloud/error-reporting` library directly to report errors to the Error Reporting Console.
![Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
# When Errors Are Reported
The `reportMode` configuration option is used to specify when errors are reported to the Error Reporting Console. It can have one of three values:
* `'production'` (default): Only report errors if the NODE_ENV environment variable is set to "production".
* `'always'`: Always report errors regardless of the value of NODE_ENV.
* `'never'`: Never report errors regardless of the value of NODE_ENV.
The `reportMode` configuration option replaces the deprecated `ignoreEnvironmentCheck` configuration option. If both the `reportMode` and `ignoreEnvironmentCheck` options are specified, the `reportMode` configuration option takes precedence.
The `ignoreEnvironmentCheck` option should not be used. However, if it is used, and the `reportMode` option is not specified, it can have the values:
* `false` (default): Only report errors if the NODE_ENV environment variable is set to "production".
* `true`: Always report errors regardless of the value of NODE_ENV.
## Setup, Configuration, and Examples
See the documentation for setup instructions, configuration options, and examples: https://cloud.google.com/error-reporting/docs/setup/nodejs
Additional code samples can also be found here: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/error-reporting