Hi Trask - We are trying to implement glowroot agent for an app that has multiple instances of the app running on a node and needs to use the same glowroot.jar. So we did setup the glowroot.properties with multi.dir=true and passing
agent.id=XXX-XXX-XXX::. We noticed that you have logic in the code that adds the nodename to the agentid in this case since it only has rollup name nad not agent name which works very well. So agent id that it now uses is something line 'XXX-XXX-XXX::<machinename>'. However when there are multiple instances the dir creation under the glowroot folder for agent seems to be complaining about a lock exception since the
agent.id is not unique.
I noticed also that the glowroot-agent-core-unshaded.Diretories class also has some logic to take a number range in the agent_id and creates sub directories appropriately for each agent. However it does not send the number from range in the
agent.id when it connects to the collector.
Any advise on how we can name the
agent.id so that it is unique for multiple instances of an app and note that I cannot change the jvm args
agent.id for each instance. Agent should be able to generate a randome number of provided number from range and be able to connect to the collector.
Thanks,
Pavani