Skip to content
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

Agent needs configurability via environment variables #57

Closed
micahhausler opened this issue Sep 27, 2017 · 2 comments
Closed

Agent needs configurability via environment variables #57

micahhausler opened this issue Sep 27, 2017 · 2 comments

Comments

@micahhausler
Copy link

micahhausler commented Sep 27, 2017

Currently the go-agent is not configurable (other than the license key) via environment variables, where most other NR agents are fully configurable via environment variables.

My biggest need right now is to set the hostname/display name so my go applications appear in infrastructure.

See my NR support ticket 263915.

@astormnewrelic
Copy link
Contributor

@micahhausler Thanks you for the feedback, and that's a great idea. We've got better configuration support on our feature roadmap now.

In the meanwhile, if you're lucky enough to be the one writing you application (as opposed to supporting an application someone else has already written can can't recompile), you do have control over the configuration settings.

If you're creating your configuration with something like this (per the sample application)

cfg := newrelic.NewConfig("Example App", mustGetEnv("NEW_RELIC_LICENSE_KEY"))

Then you can set your own host display name with code that looks like the following

cfg := newrelic.NewConfig("Example App", mustGetEnv("NEW_RELIC_LICENSE_KEY"))
cfg.HostDisplayName = "My Great Name";

Also, here's a link to the configuration struct that has a list of all the field programmers can manually set.

So, while not as neat and tidy as a separate environment variable configuration system, this might be able to get you where you need to be.

We're going to close this issue out for now, but if you have additional feedback please don't hesitate to reopen and/or respond (either here, or via the support ticket_

sergeylanzman pushed a commit to sergeylanzman/go-agent that referenced this issue Oct 5, 2017
Implement Slow Query Traces
@purple4reina
Copy link
Contributor

Hi @sergeylanzman!

I know you posted this issue a while ago, but we have a proposed solution for you! We're considering some changes for a major version 3.0 release. Part of this would be a change to how we do application configuration. Take a look at the list of proposed changes here #106.

What do you think of these proposals? We'd love to hear your thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants