nodejs-error-reporting icon indicating copy to clipboard operation
nodejs-error-reporting copied to clipboard

Pick up projectId from keyFilename

Open chiawendt opened this issue 6 years ago • 0 comments

Describe the solution you'd like Automatically fill in projectId if keyFilename is provided and resolves to a json file.

const errors = new ErrorReporting({
  // projectId: 'no need to fill in this field',
  keyFilename: <path>,
}

Additional context @google-cloud/logging-winston does this.

https://github.com/googleapis/nodejs-logging-winston/blob/b202975b1d000e320b7416f5a3b2a527eb4e7f83/src/types/core.d.ts#L68-L74

chiawendt avatar Jun 21 '19 11:06 chiawendt