MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / explicitSetup

Function explicitSetup

error-reporting/explicitSetup.js:22–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20'use strict';
21
22function explicitSetup() {
23 // [START error_reporting_setup_nodejs_explicit]
24 // Imports the Google Cloud client library
25 const {ErrorReporting} = require('@google-cloud/error-reporting');
26
27 // Instantiates a client
28 const errors = new ErrorReporting({
29 projectId: 'your-project-id',
30 keyFilename: '/path/to/key.json',
31 });
32
33 // Reports a simple error
34 errors.report('Something broke!');
35 // [END error_reporting_setup_nodejs_explicit]
36}
37
38explicitSetup();

Callers 1

explicitSetup.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected