Skip to content

Commit 70cb8ca

Browse files
committed
chore: add relevant dropped / overwritten sections in README
1 parent 1755420 commit 70cb8ca

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

handwritten/error-reporting/README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111

1212

13-
Error Reporting Client Library for Node.js
13+
> Node.js idiomatic client for [Error Reporting][product-docs].
14+
15+
[Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
1416

1517

1618
A comprehensive list of changes in each version may be found in
@@ -43,7 +45,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4345

4446
1. [Select or create a Cloud Platform project][projects].
4547
1. [Enable the Error Reporting API][enable_api].
46-
1. [Set up authentication][auth] so you can access the
48+
1. [Set up authentication with a service account][auth] so you can access the
4749
API from your local workstation.
4850

4951
### Installing the client library
@@ -52,7 +54,35 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
5254
npm install @google-cloud/error-reporting
5355
```
5456

57+
This module provides custom Error Reporting support for Node.js applications.
58+
[Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
59+
Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by
60+
applications running in almost any environment.
61+
62+
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.
63+
64+
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.
65+
66+
![Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
67+
68+
# When Errors Are Reported
69+
70+
The `reportMode` configuration option is used to specify when errors are reported to the Error Reporting Console. It can have one of three values:
71+
* `'production'` (default): Only report errors if the NODE_ENV environment variable is set to "production".
72+
* `'always'`: Always report errors regardless of the value of NODE_ENV.
73+
* `'never'`: Never report errors regardless of the value of NODE_ENV.
74+
75+
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.
76+
77+
The `ignoreEnvironmentCheck` option should not be used. However, if it is used, and the `reportMode` option is not specified, it can have the values:
78+
* `false` (default): Only report errors if the NODE_ENV environment variable is set to "production".
79+
* `true`: Always report errors regardless of the value of NODE_ENV.
80+
81+
## Setup, Configuration, and Examples
82+
83+
See the documentation for setup instructions, configuration options, and examples: https://cloud.google.com/error-reporting/docs/setup/nodejs
5584

85+
Additional code samples can also be found here: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/error-reporting
5686

5787

5888

@@ -122,4 +152,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
122152
[projects]: https://console.cloud.google.com/project
123153
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
124154
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=clouderrorreporting.googleapis.com
125-
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
155+
[auth]: https://cloud.google.com/docs/authentication/getting-started

0 commit comments

Comments
 (0)