newrelic.js config validator
See original GitHub issueIs 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Validate config file settings with nrdiag
How to validate your config file settings when using New Relic Diagnostics (nrdiag); for example, with deployments.
Read more >Node.js agent configuration
The primary method to configure the Node.js agent is the agent configuration file ( newrelic.js ). You can also configure most settings with...
Read more >NET agent configuration
How to configure the New Relic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.
Read more >Node.js Troubleshooting Framework Configuration
Run the Diagnostics CLI to collect data then validate: Confirm Node. js and NPM version meets requirements.
Read more >Configure the infrastructure agent
Use a validator to ensure the syntax is accurate before using the file with the infrastructure agent. Configuration management tools. To install and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That would be a pretty sweet feature @davidnormo – I know I would have liked something similar when I was starting with the Node Agent, and I can think of a bunch of support tickets where having such a thing would have helped.
Do you think you’d use something formal like JSON Schema for this? Or something a bit simpler with a set of type rules for each “path” into the JSON file? Or some third thing?
@davidnormo is this something you are still working on? If not, we will close this out.