You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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.
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:
ConfigFromEnvironment()
, but getting data from a user supplied source instead of environment variablesNewRelic
stanza or section with our fields.map[string]string
value from whatever source they prefer and then pass that to a function likeConfigFromMap(value)
The text was updated successfully, but these errors were encountered: