When I am running my NewRelic plugin, it seems to be calling pollCycle twice in a row.

StackOverflow https://stackoverflow.com/questions/18187000

  •  24-06-2022
  •  | 
  •  

Pregunta

I have written a NewRelic plugin. I have been debugging it, and noticed that the pollCycle is being called twice in a row. Since we are resetting our data after each call, this is causing some very skewed numbers. Anybody have any idea why this is happening or how I can stop it?

¿Fue útil?

Solución

In the New Relic Java SDK for plugin development, the pollCycle() method is invoked once for each Agent that is added via the runner.add() method. The runner will call the pollCycle() method once for each component created by these agent factories.

You can verify that this is the case by only adding one of the two factories and seeing that pollCycle() is called only once.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top