Skip to content

Add a way to suppress WARN for stackdriver NODE_ENV setup #460

@defunctzombie

Description

@defunctzombie

When I run my unit tests, the stdout contains lots of the following warning:

WARN:@google-cloud/error-reporting: The stackdriver error reporting client is configured to report errors if and only if the NODE_ENV environment variable is set to "production". Errors will not be reported. To have errors always reported, regardless of the value of NODE_ENV, set the reportMode configuration option to "always".

This happens because my unit tests invoke my entire app (a koa2 app) which includes the error reporting setup.

I'd like a way to suppress this warning for testing - maybe by handling NODE_ENV=test or a configuration option.

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