You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/02/21 10:15:57 UTC

[GitHub] [skywalking] BobDu commented on a change in pull request #6415: fix agent hostname unknown #4520

BobDu commented on a change in pull request #6415:
URL: https://github.com/apache/skywalking/pull/6415#discussion_r579784172



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/os/OSUtil.java
##########
@@ -50,6 +50,13 @@ public static String getHostName() {
                 HOST_NAME = host.getHostName();
             } catch (UnknownHostException e) {
                 HOST_NAME = "unknown";
+                String host = e.getMessage();

Review comment:
       In #4520, say it‘s a special case.
   But i Think this following scenarios are many,
   only change hostname, like `FooBar-01` in `/etc/hostname`(in linux),
   usually, we don't add `192.xxx.xxx.xxx FooBar-01` in `/etc/hosts` or add it in our private dns service.
   I aggre you say in #4520, 
   but in this situation, agent get hostname is `FooBar-01` better than `unknown`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org