-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[system detector] Fallback to os.Hostname
when FQDN is not available
#3099
[system detector] Fallback to os.Hostname
when FQDN is not available
#3099
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3099 +/- ##
==========================================
+ Coverage 91.64% 91.65% +0.01%
==========================================
Files 482 482
Lines 23381 23385 +4
==========================================
+ Hits 21427 21434 +7
+ Misses 1454 1449 -5
- Partials 500 502 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This change is fine for a short-term fix IMO, but longer term, what do you think about moving away from the fqdn third party library we're using, and coding the fqdn resolution ourselves? I say this because the library is small, but it doesn't seem to have the fallback behavior we want. |
What is the fallback behavior we want? I think we don't want to fall back to |
Yeah, that's the fallback behavior I was thinking of. The fact that the library gets the hostname then tries to get the fqdn, and if that fails, we get the hostname seemed a little redundant. But your explanation makes sense. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for fixing it!
open-telemetry#3099) - Fall back to `os.Hostname` when FQDN is not available. **Link to tracking Issue:** Fixes open-telemetry#3092
Description:
os.Hostname
when FQDN is not available.Link to tracking Issue: Fixes #3092
Testing: Updated unit tests