[ 
https://issues.apache.org/jira/browse/HTRACE-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14381029#comment-14381029
 ] 

Colin Patrick McCabe commented on HTRACE-144:
---------------------------------------------

Another quick note about choosing the best ip address:

To handle multi-homing:
* do not use localhost addresses (i.e. 127.0.0.x) if at all possible.
* prefer non-routable addresses (i.e. internal ones, such as 192.168.0.1, 
etc.).  These should be used by nodes to talk to each other, rather than the 
internet at large.
* if all else fails, pick the non-localhost IP address which comes first in 
sorting order, to ensure that we at least have a consistent identifier.
* if everything is totally screwed (can't access interfaces, etc.), return 
127.0.0.1 (shouldn't happen)

I think in 99% of cases, this will be adequate.  even in multi-homing cases.  
If this isn't adequate, the user can configure a specific process ID per node 
by setting the {{process.id}} configuration variable to a non-default value.

I also think we should add a {{$\{pid\}}} variable later, to inject the UNIX 
process ID.  However, this turns out to be complicated in Java so let's do it 
in a follow-on.  Same for hostnames, I think... we should be careful there 
since there are hairy DNS issues we'll need to think about with hostnames

> Include IP address in span process description
> ----------------------------------------------
>
>                 Key: HTRACE-144
>                 URL: https://issues.apache.org/jira/browse/HTRACE-144
>             Project: HTrace
>          Issue Type: Improvement
>    Affects Versions: 3.2.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-144.001.patch, HTRACE-144.002.patch
>
>
> Right now, we have no IP address or hostname specified in the span process 
> description.  So if we have 100 datanodes, the spans from all of them simply 
> show up as "DataNode."  Obviously this is unsatisfactory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to