New Relic Elixir Agent v1.0.0 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)

Configure the host to report to. Most customers have no need to set this

Configure your New Relic License Key. Required

Configure the Agent logging mechanism. Defaults to "tmp/new_relic.log"

Link to this section 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)

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"
  ]

Configure the host to report to. Most customers have no need to set this.

Configure your New Relic License Key. Required

Configure the Agent logging mechanism. Defaults to "tmp/new_relic.log"

Options:

  • "stdout"
  • "memory" (Useful for testing)
  • "file_name.log"