-
Notifications
You must be signed in to change notification settings - Fork 604
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
Logger does not use process_host.display_name
when setting hostname
in the logs
#1696
Comments
Hi @flivni! Thanks for calling attention to this and providing a suggested fix. The features for log events need to be consistent across all New Relic’s agents. Since this is a new feature, we will need to bring this back to our team before making updates as there are a few other changes that need to take place and processes to go through. We will follow up with updates. Thanks again for reporting this! |
Thanks @hannahramadan. I look forward to the updates. |
The default value of 'process_host.display_name' is the same as NewRelic::Agent::Hostname.get, so this change will only impact users who have set a unique value on the config. Resolves #1696
Hi @flivni! We're coming back to this issue. Thank you for your patience. Is this still a problem you'd like to see resolved? |
Yup. I can create a PR if you'd like. |
Thank you, @flivni! I drafted #3096 for this feature, please take a look when you can. Unfortuantely, it needs to stay in draft mode for a while. I'm starting the architectural conversations my colleague mentioned in her last comment, and will keep you posted on the progress. WRT this quote:
I misspoke here. The While we're having the internal conversations, there are some ways you can add the You could update one of these configs using your
Unfortunately, these options do not apply to the |
The logger does not use
process_host.display_name
when settinghostname
in the logs. Instead it usesSocket.gethostname
via a call toNewRelic::Agent::Hostname.get
.I believe it is a bug. (In another issue, a New Relic developer assumes the feature already acts this way when she says "Alternatively, we have the ability to set the app name (entity.name in the default attributes) and hostname by configuration in either the newrelic.yml file or by environment variable"). #1141
You can see the offending code here:
newrelic-ruby-agent/lib/new_relic/agent/logging.rb
Line 51 in 74737a4
I think the fix is to just replace with:
Agent.config[:'process_host.display_name']
I can create a PR if that would be helpful.
Thanks!
The text was updated successfully, but these errors were encountered: