nodejs-error-reporting
nodejs-error-reporting copied to clipboard
Pick up projectId from keyFilename
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