Skip to content

Commit aee698f

Browse files
Simon Zeltserfreelerobot
andauthored
chore: add api-logging to codeowners (#522)
Co-authored-by: Nicole Zhu <69952136+nicoleczhu@users.noreply.github.com>
1 parent 8d73781 commit aee698f

File tree

4 files changed

+29
-37
lines changed

4 files changed

+29
-37
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77

88
# The yoshi-nodejs team is the default owner for nodejs repositories.
9-
* @googleapis/yoshi-nodejs
9+
* @googleapis/api-logging @googleapis/yoshi-nodejs

.readme-partials.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
introduction: |-
22
> Node.js idiomatic client for [Error Reporting][product-docs].
33
4-
[Stackdriver Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
4+
[Cloud Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
55
66
body: |-
7-
This module provides custom Stackdriver Error Reporting support for Node.js applications.
8-
[Stackdriver Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
7+
This module provides custom Cloud Error Reporting support for Node.js applications.
8+
[Cloud Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
99
Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by
1010
applications running in almost any environment.
1111
1212
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.
1313
1414
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.
1515
16-
![Stackdriver Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
16+
![Cloud Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
1717
1818
Here's an introductory video that provides some more details:
1919
20-
[![Learn about Error Reporting in Stackdriver](https://img.youtube.com/vi/cVpWVD75Hs8/0.jpg)](https://www.youtube.com/watch?v=cVpWVD75Hs8)
20+
[![Learn about Error Reporting in Cloud](https://img.youtube.com/vi/cVpWVD75Hs8/0.jpg)](https://www.youtube.com/watch?v=cVpWVD75Hs8)
2121
2222
# When Errors Are Reported
2323
@@ -232,7 +232,7 @@ body: |-
232232
process.on('uncaughtException', (e) => {
233233
// Write the error to stderr.
234234
console.error(e);
235-
// Report that same error the Stackdriver Error Service
235+
// Report that same error the Cloud Error Service
236236
errors.report(e);
237237
});
238238
```

.repo-metadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "error-reporting",
3-
"name_pretty": "Stackdriver Error Reporting",
3+
"name_pretty": "Cloud Error Reporting",
44
"product_documentation": "https://cloud.google.com/error-reporting",
55
"client_documentation": "https://googleapis.dev/nodejs/error-reporting/latest/",
66
"issue_tracker": "https://issuetracker.google.com/savedsearches/559780",
77
"release_level": "beta",
88
"language": "nodejs",
99
"repo": "googleapis/nodejs-error-reporting",
1010
"distribution_name": "@google-cloud/error-reporting",
11-
"api_id": "clouderrorreporting.googleapis.com"
11+
"api_id": "clouderrorreporting.googleapis.com",
12+
"codeowner_team": "@googleapis/api-logging"
1213
}

README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@
22
[//]: # "To regenerate it, use `python -m synthtool`."
33
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
44

5-
# [Stackdriver Error Reporting: Node.js Client](https://github.com/googleapis/nodejs-error-reporting)
5+
# [Cloud Error Reporting: Node.js Client](https://github.com/googleapis/nodejs-error-reporting)
66

77
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
88
[![npm version](https://img.shields.io/npm/v/@google-cloud/error-reporting.svg)](https://www.npmjs.org/package/@google-cloud/error-reporting)
99
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-error-reporting/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-error-reporting)
1010

11-
12-
13-
1411
> Node.js idiomatic client for [Error Reporting][product-docs].
1512
16-
[Stackdriver Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
17-
13+
[Cloud Error Reporting](https://cloud.google.com/error-reporting/docs/) aggregates and displays errors produced in your running cloud services.
1814

1915
A comprehensive list of changes in each version may be found in
2016
[the CHANGELOG](https://github.com/googleapis/nodejs-error-reporting/blob/master/CHANGELOG.md).
2117

22-
* [Stackdriver Error Reporting Node.js Client API Reference][client-docs]
23-
* [Stackdriver Error Reporting Documentation][product-docs]
18+
* [Cloud Error Reporting Node.js Client API Reference][client-docs]
19+
* [Cloud Error Reporting Documentation][product-docs]
2420
* [github.com/googleapis/nodejs-error-reporting](https://github.com/googleapis/nodejs-error-reporting)
2521

2622
Read more about the client libraries for Cloud APIs, including the older
@@ -30,7 +26,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
3026

3127
**Table of contents:**
3228

33-
3429
* [Quickstart](#quickstart)
3530
* [Before you begin](#before-you-begin)
3631
* [Installing the client library](#installing-the-client-library)
@@ -44,9 +39,9 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4439

4540
### Before you begin
4641

47-
1. [Select or create a Cloud Platform project][projects].
48-
1. [Enable the Stackdriver Error Reporting API][enable_api].
49-
1. [Set up authentication with a service account][auth] so you can access the
42+
1. [Select or create a Cloud Platform project][projects].
43+
1. [Enable the Cloud Error Reporting API][enable_api].
44+
1. [Set up authentication with a service account][auth] so you can access the
5045
API from your local workstation.
5146

5247
### Installing the client library
@@ -55,7 +50,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
5550
npm install @google-cloud/error-reporting
5651
```
5752

58-
5953
### Using the client library
6054

6155
```javascript
@@ -69,37 +63,40 @@ const errors = new ErrorReporting();
6963
errors.report('Something broke!');
7064

7165
```
72-
This module provides custom Stackdriver Error Reporting support for Node.js applications.
73-
[Stackdriver Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
66+
This module provides custom Cloud Error Reporting support for Node.js applications.
67+
[Cloud Error Reporting](https://cloud.google.com/error-reporting/) is a feature of
7468
Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by
7569
applications running in almost any environment.
7670

7771
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.
7872

7973
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.
8074

81-
![Stackdriver Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
75+
![Cloud Error Reporting overview](https://raw.githubusercontent.com/googleapis/nodejs-error-reporting/master/doc/images/errors-overview.png)
8276

8377
Here's an introductory video that provides some more details:
8478

85-
[![Learn about Error Reporting in Stackdriver](https://img.youtube.com/vi/cVpWVD75Hs8/0.jpg)](https://www.youtube.com/watch?v=cVpWVD75Hs8)
79+
[![Learn about Error Reporting in Cloud](https://img.youtube.com/vi/cVpWVD75Hs8/0.jpg)](https://www.youtube.com/watch?v=cVpWVD75Hs8)
8680

8781
# When Errors Are Reported
8882

8983
The `reportMode` configuration option is used to specify when errors are reported to the Error Reporting Console. It can have one of three values:
84+
9085
* `'production'` (default): Only report errors if the NODE_ENV environment variable is set to "production".
9186
* `'always'`: Always report errors regardless of the value of NODE_ENV.
9287
* `'never'`: Never report errors regardless of the value of NODE_ENV.
9388

9489
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.
9590

9691
The `ignoreEnvironmentCheck` option should not be used. However, if it is used, and the `reportMode` option is not specified, it can have the values:
92+
9793
* `false` (default): Only report errors if the NODE_ENV environment variable is set to "production".
9894
* `true`: Always report errors regardless of the value of NODE_ENV.
9995

10096
See the [Configuration](#configuration) section to learn how to specify configuration options.
10197

10298
## Configuration
99+
103100
The following code snippet lists available configuration options. All configuration options are optional.
104101

105102
```js
@@ -156,6 +153,7 @@ errors.report('My error message');
156153
```
157154

158155
The stack trace associated with an error can be viewed in the error reporting console.
156+
159157
* If the `errors.report` method is given an `ErrorMessage` object built using the `errors.event` method, the stack trace at the point where the error event was constructed will be used.
160158
* If the `errors.report` method is given an `Error` object, the stack trace where the error was instantiated will be used.
161159
* If the `errors.report` method is given a string, the stack trace at the point where `errors.report` is invoked will be used.
@@ -297,7 +295,7 @@ const errors = new ErrorReporting();
297295
process.on('uncaughtException', (e) => {
298296
// Write the error to stderr.
299297
console.error(e);
300-
// Report that same error the Stackdriver Error Service
298+
// Report that same error the Cloud Error Service
301299
errors.report(e);
302300
});
303301
```
@@ -334,6 +332,7 @@ The [longjohn](https://www.npmjs.com/package/longjohn) module can be used with t
334332
Before reporting an `Error` object using the `report` method of the `@google-cloud/error-reporting` module, the stack trace needs to modified to remove this special line added by `longjohn`. Since the `longjohn` module can be configured to have a custom line indicating an async jump, the process of removing the custom line should be handled by the user of the `longjohn` module.
335333

336334
The following code illustrates how to update an `Error`'s stack trace, to remove the default line of dashes added by `longjohn` to indicate an async jump, before reporting the error.
335+
337336
```js
338337
const {ErrorReporting} = require('@google-cloud/error-reporting');
339338

@@ -347,7 +346,6 @@ err.stack = (err.stack || '').split('\n')
347346
errors.report(err);
348347
```
349348

350-
351349
## Samples
352350

353351
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-error-reporting/tree/master/samples) directory. The samples' `README.md`
@@ -361,9 +359,7 @@ has instructions for running the samples.
361359
| Manual reporting | [source code](https://github.com/googleapis/nodejs-error-reporting/blob/master/samples/manual.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-error-reporting&page=editor&open_in_editor=samples/manual.js,samples/README.md) |
362360
| Quickstart | [source code](https://github.com/googleapis/nodejs-error-reporting/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-error-reporting&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
363361

364-
365-
366-
The [Stackdriver Error Reporting Node.js Client API Reference][client-docs] documentation
362+
The [Cloud Error Reporting Node.js Client API Reference][client-docs] documentation
367363
also contains samples.
368364

369365
## Supported Node.js Versions
@@ -382,7 +378,7 @@ _Legacy Node.js versions are supported as a best effort:_
382378
* Some security patches may not be able to be backported.
383379
* Dependencies will not be kept up-to-date, and features will not be backported.
384380

385-
#### Legacy tags available
381+
### Legacy tags available
386382

387383
* `legacy-8`: install client libraries from this dist-tag for versions
388384
compatible with Node.js 8.
@@ -391,16 +387,11 @@ _Legacy Node.js versions are supported as a best effort:_
391387

392388
This library follows [Semantic Versioning](http://semver.org/).
393389

394-
395-
396390
This library is considered to be in **beta**. This means it is expected to be
397391
mostly stable while we work toward a general availability release; however,
398392
complete stability is not guaranteed. We will address issues and requests
399393
against beta libraries with a high priority.
400394

401-
402-
403-
404395
More Information: [Google Cloud Platform Launch Stages][launch_stages]
405396

406397
[launch_stages]: https://cloud.google.com/terms/launch-stages

0 commit comments

Comments
 (0)