1717
1818function setupImplicit ( ) {
1919 // [START error_reporting_setup_implicit]
20+ // [START error_reporting_setup_nodejs_implicit]
2021 // Imports the Google Cloud client library
2122 const ErrorReporting = require ( '@google-cloud/error-reporting' )
2223 . ErrorReporting ;
@@ -33,11 +34,13 @@ function setupImplicit() {
3334
3435 // Reports a simple error
3536 errors . report ( 'Something broke!' ) ;
37+ // [END error_reporting_setup_nodejs_implicit]
3638 // [END error_reporting_setup_implicit]
3739}
3840
3941function setupExplicit ( ) {
4042 // [START error_reporting_setup_explicit]
43+ // [START error_reporting_setup_nodejs_explicit]
4144 // Imports the Google Cloud client library
4245 const ErrorReporting = require ( '@google-cloud/error-reporting' )
4346 . ErrorReporting ;
@@ -57,11 +60,13 @@ function setupExplicit() {
5760
5861 // Reports a simple error
5962 errors . report ( 'Something broke!' ) ;
63+ // [END error_reporting_setup_nodejs_explicit]
6064 // [END error_reporting_setup_explicit]
6165}
6266
6367function manual ( ) {
6468 // [START error_reporting_manual]
69+ // [START error_reporting_setup_nodejs_manual]
6570 // Imports the Google Cloud client library
6671 const ErrorReporting = require ( '@google-cloud/error-reporting' )
6772 . ErrorReporting ;
@@ -97,11 +102,13 @@ function manual() {
97102 errors . report ( 'My error message' , ( ) => {
98103 console . log ( 'Done reporting error string!' ) ;
99104 } ) ;
105+ // [END error_reporting_setup_nodejs_manual]
100106 // [END error_reporting_manual]
101107}
102108
103109function express ( ) {
104110 // [START error_reporting_express]
111+ // [START error_reporting_setup_nodejs_express]
105112 const express = require ( 'express' ) ;
106113
107114 // Imports the Google Cloud client library
@@ -138,6 +145,7 @@ function express() {
138145 console . log ( `App listening on port ${ PORT } ` ) ;
139146 console . log ( 'Press Ctrl+C to quit.' ) ;
140147 } ) ;
148+ // [END error_reporting_setup_nodejs_express]
141149 // [END error_reporting_express]
142150}
143151
0 commit comments