-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support env vars for parity with other agents #104
Comments
@novas0x2a Thanks a ton for sharing this issue with us! We think this is a great idea. We're in the process now of planning for a 3.0 release in which we are considering something like what you suggest. Our idea is to simplify the creation of the Application object. Instead of needing to create a Config, then an Application from the Config, you'd use one method to create the Application and pass it a set of options much like we've done in our telemetry-sdk. It would look something like this: app, err := newrelic.NewApplication("MyAppName", "MyLicenseKey", newrelic.ConfigDistributedTracingEnabled) One such option we could have would allow reading from environment variables. So, in your case, you'd do something like this: app, err := newrelic.NewApplication("MyAppName", "MyLicenseKey", newrelic.ConfigFromEnvVar) Notice that the agent wouldn't read settings from environment variables by default, but you could easily configure it to do so. What are your thoughts? Would this type of system fit your needs? |
Hi @novas0x2a! We've recently published some proposed changes to the agent for a 3.0 major version release #106. We're wondering what you think of these changes and if they will fit your needs. |
This seems fine, yep! They're not listed in the doc, but as long as the env vars match up with the other clients it looks like this would work fine for us (we set the env vars globally, so we're very aware of mismatches like node's |
Hey @novas0x2a! Thanks again for opening this issue! We just released v3.0.0 of the agent which has support for setting configuration via environment variables. Check it out and let us know what you think! If there's any env vars that you'd like added, just let us know! |
Some of the other language agents support environment-based config (e.g. java, node), would it be possible for this lib to support them too, probably by loading them in NewConfig and only falling back to the current defaults if the vars are unset? Thanks!
The text was updated successfully, but these errors were encountered: