Skip to content
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

Unify hostname detection in config and telemetry #4352

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

smola
Copy link
Member

@smola smola commented Dec 1, 2022

What Does This Do

  • In telemetry, use the hostname discovered in Config initialization.
  • In Config, try /proc/sys/kernel/hostname and /etc/hostname before the hostname command.

Motivation

We detected hostname twice, and in slightly different ways (Telemetry wouldn't use environment variables, Config wouldn't use hostname files).

Additional Notes

Initially discovered while monitoring the execution of external process, which was triggered Config's execution of hostname

@smola smola added comp: core Tracer core comp: telemetry Telemetry labels Dec 1, 2022
@smola smola requested a review from a team as a code owner December 1, 2022 08:30
@smola smola force-pushed the smola/unify-hostname-detection branch 2 times, most recently from d01ad98 to 3aa334b Compare December 1, 2022 09:20
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for consistency, also makes sense to check known files before running the external process

smola added 2 commits December 1, 2022 13:43
* In telemetry, used the hostname discovered in Config initialization.
* In Config, try `/proc/sys/kernel/hostname` and `/etc/hostname` before
  the `hostname` command.
@smola smola force-pushed the smola/unify-hostname-detection branch from 3aa334b to b43facf Compare December 1, 2022 12:43
@smola smola merged commit eb97181 into master Dec 1, 2022
@smola smola deleted the smola/unify-hostname-detection branch December 1, 2022 15:18
@github-actions github-actions bot added this to the 1.2.0 milestone Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core comp: telemetry Telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants