Is your feature request related to a problem? Please describe.

When eureka-instance is registering itself during startup, it is logging the registration state with messages containing the eureka.instance.instand_id. the default instance_id uses the host-name (machine hostname) which usually is the same as default eureka.instance.hostname. After changing the eureka.instance.hostname without changing the instance_id, the log messages still showing the machine hostname (because instance_id is the same default one). This is confusing for some developers because they think the log message is showing them the old eureka.instance.hostname where in fact the message is not related to instance hostname.

example logs:

DiscoveryClient_MY-CLIENT/192.168.0.10:my-client: registering service...
DiscoveryClient_MY-CLIENT/192.168.0.10:my-client - registration status: 204

log format:

DiscoveryClient_<app name>/<host-name>:<app name>: message

Here is a sample issue which is the result of the same confusion

Describe the solution you'd like Adding extra info about the instance.hostname or changing the log format to make it clear that above value is the instance_id and not the hostname.

Comment From: MallikharjunaTeja

i want to work on this @OlgaMaciaszek

Comment From: OlgaMaciaszek

Sounds great @MallikharjunaTeja. I have assigned the issue to you. Feel free to submit a PR.

Comment From: OlgaMaciaszek

@MallikharjunaTeja please work on the PR against 3.1.x branch instead of main for this feature.

Comment From: MallikharjunaTeja

@OlgaMaciaszek i am unable to build and getting this error Screenshot (94)

Comment From: OlgaMaciaszek

@MallikharjunaTeja Please build and add changes for it on 3.1.x branch.

Comment From: MallikharjunaTeja

@spencergibb I'm not finding the appropriate file to make the changes mentioned in the issue. Can you help me on that.

Comment From: spencergibb

Not sure why we thought this could be done here. These messages are in https://github.com/Netflix/eureka/blob/master/eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java#L873