newrelic.js config validator
Table of Contents
Is your feature request related to a problem? Please describe.
Yes. I added the expected_status_codes
property to my project config but didn’t realise it was wrapped in the error_collector
object. Took a while to get to the bottom of the problem. Having a little script that can validate the config file and point out errors would be really handy.
Feature Description
A script that the user can run to validate the newrelic.js config file. For example:
$ npx newrelic-validate-config
Found 3 issues:
1. Unexpected property `expected_status_codes`. Did you mean `error_collector.expected_status_codes`?
2. Invalid type given for `app_name` should be `array` found `string`
3. Invalid value given for `logging.level` found "errror" should be one of: "fatal", "error", "warn", "info", "debug" or "trace"
Describe Alternatives
n/a
Additional context
I’m happy to contribute to the solution, just wanted to get an idea if people would find this useful or not?
Priority
Really Want
Read more here: Source link