Gerrit has already a parameter to define an identifier for the instances. This could be included in the events generated by the different nodes.
The instanceName
is currently set in the gerrit.config
. It defaults to the full hostname if not set in gerrit.instanceName
.
Propagation of the id in the events can be done as explained in Proposed solution or Alternative Solution - 2.
instanceName
is not used to uniquely identify an instance in a cluster.
For example, it is, available to the email templating system.
Using it would couple the presentation logic to something more backend specific as identifying an instance in a cluster. Also, it could not necessarily be relevant for the end users receiving it in their inbox.
Same consideration as in the proposed solution