New Relic Elixir Agent v1.9.11 NewRelic.Config View Source
New Relic Agent Configuration
All configuration items can be set via ENV variable or via Application config
Link to this section Summary
Functions
Configure your application name. Required
An optional list of key/value pairs that will be automatic custom attributes on all event types reported (Transactions, etc)
Some Agent features can be controlled via configuration
Configure the host to report to. Most customers have no need to set this
An optional list of labels that will be applied to the application
Configure your New Relic License Key. Required
Configure the Agent logging mechanism
Link to this section Functions
app_name() View Source
Configure your application name. Required
May contain up to 3 names seperated by ;
automatic_attributes() View Source
An optional list of key/value pairs that will be automatic custom attributes on all event types reported (Transactions, etc).
Options:
{:system, "ENV_NAME"}
Read a System ENV variable{module, function, args}
Call a function. Warning: Be very careful, this will get called a lot!"foo"
A direct value
Example:
config :new_relic_agent,
automatic_attributes: [
environment: {:system, "APP_ENV"},
node_name: {Node, :self, []},
team_name: "Afterlife"
]
feature?(atom) View Source
Some Agent features can be controlled via configuration
:error_collector_enabled
(defaulttrue
)
host() View Source
Configure the host to report to. Most customers have no need to set this.
labels() View Source
An optional list of labels that will be applied to the application.
Configured with a single string containing a list of key-value pairs:
key1:value1;key2:value2
The delimiting characters ;
and :
are not allowed in the key
or value
Example:
config :new_relic_agent, labels: "region:west;env:prod"
license_key() View Source
Configure your New Relic License Key. Required
logger() View Source
Configure the Agent logging mechanism.
Defaults to "tmp/new_relic.log"
.
Options:
"stdout"
"Logger"
Elixir's Logger"memory"
(Useful for testing)"file_name.log"