In my project there is a YAML file for NewRelic newrelic.yml that has a line with Ruby code for setting app_name. The existing config is working,
newrelic.yml
app_name