question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a function to newrelic agent to specify config file path

See original GitHub issue

Is your feature request related to a problem? Please describe.

I am trying to change the config file path using environment variables using a node.js package called dot-env. But adding environment variable on the .env file will not actually add environment variables in the system, so newrelic agent won’t recognize it. (The environment variables in .env file and systems environment variables are accessible at process.env)

Feature Description

A simple function to specify config file path. Like require("newrelic").setConfigFilePath("./newrelic.js")

Describe Alternatives

I think the newrelic agent is not using process.env for getting the environment variables (I donno the current method of getting the environment variables in the agent). If process.env is used then it will be more easier.

Additional context

Add any other context here.

Priority

Really Want

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rr0214commented, Aug 25, 2021

Given our current strategy, this won’t be a priority for us at this time.

0reactions
fedeoocommented, Jun 9, 2021

Personally, putting config in package.json file is better just like jest does. I know NEW_RELIC_HOME is working. But in the same case, I have to specify it again for production when I have different build paths. If we can put it inside of package.json, we don’t need to care about the path.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js agent configuration - New Relic Documentation
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 >
Java agent configuration: Config file | New Relic Documentation
New Relic applies settings in the common stanza to each of these environments. You can select other environments as the default by setting...
Read more >
Configure the infrastructure agent | New Relic Documentation
The default method to configure the infrastructure agent is the newrelic-infra.yml config file. You can override the config file by setting environment ...
Read more >
Python agent configuration | New Relic Documentation
The primary way to configure the Python agent is via the configuration file, which is generated as part of the standard install process....
Read more >
.NET agent configuration | New Relic Documentation
Fourth-highest precedence. You can create app-local newrelic.config files to configure individual apps on a multi-app system. These local configuration files ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found