Advice when developing a custom service for the agent to give an example of where it can cause the agent to disconnect from the Enterprise Manager
No disconnection was recorded during the first hour of running the agent
- with debug log we had this log message:
[DEBUG] [IntroscopeAgent.ConnectionThread] ConnectionThread caught throwable while sending data java.lang.NullPointerException
With more debug operation we finally found that :
- agent.IAgent_getDataAccumulatorFactory().safeGetStringEveryEventDataAccumulator(metricname).IStringEveryEventDataAccumulator_addString(sanitizedValue);
with a null value leads to an exception while sending data
The exception tries to close connection to server
Release : 10.7.0
Component : APM Agents
The custom service code was verified to protect against a null value.