Skip to content

Pick up projectId from keyFilename #380

@golopot

Description

@golopot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: clouderrorreportingIssues related to the googleapis/nodejs-error-reporting API.priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions