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

Feature to configure Go agent from config file #560

Open
nr-swilloughby opened this issue Aug 25, 2022 · 1 comment
Open

Feature to configure Go agent from config file #560

nr-swilloughby opened this issue Aug 25, 2022 · 1 comment

Comments

@nr-swilloughby
Copy link
Contributor

Suggested by @rittneje; Thanks!

It would be helpful to provide a way to make it easy to configure the Go Agent from user-supplied data such as a configuration file.

This is something that we should put a bit of careful thought behind to make it the most useful without requiring unnecessary constraints on the user (such as supporting only one NR-specific file format).

Some ideas off the top of my head:

  • Mimic what we already do for ConfigFromEnvironment(), but getting data from a user supplied source instead of environment variables
    • This also implies we would refactor both to use common code behind the scenes
  • Perhaps support a common interface for configuration files of various sorts, such as looking for a NewRelic stanza or section with our fields.
  • Perhaps let the user load the data into a map[string]string value from whatever source they prefer and then pass that to a function like ConfigFromMap(value)
@nr-swilloughby nr-swilloughby added this to Awaiting User Input in Go Engineering Board via automation Aug 25, 2022
@nr-swilloughby nr-swilloughby moved this from Awaiting User Input to To Do in Go Engineering Board Aug 26, 2022
@nr-swilloughby
Copy link
Contributor Author

We have implemented text marshalling for the code level metrics values that don't directly map to basic types (i.e., scope value) so perhaps it would be sufficient to make it convenient to unmarshal user data into the config struct directly.

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

No branches or pull requests

1 participant