beam-telemetry/telemetry_poller

`default` option should be set on initializing

v0idpwn opened this issue · 6 comments

A default poller is started with telemetry_poller responsible for emitting
measurements for memory and total_run_queue_lengths. You can customize
the behaviour of the default poller by setting the default key under the
telemetry_poller application environment. Setting it to false disables
the poller.

This makes it pretty hard to use multiple instances of :telemetry_poller (which is currently required to use multiple periods). I think a good approach would be to move it to :telemetry_poller startup options. This would also fit with the "avoid config files" approach which is more flexible.

You can start multiple instances, just give each of them a name, such as: myapp1, myapp2, etc. :) Maybe the docs could be clearer here?

@josevalim I think maybe I wasn't very clear. actually, the problem I mean is:

:telemetry_poller queries vm metrics by default. I can disable this behaviour only in the app environment. Thanks to that, I can only a) have all the multiple instances querying default metrics b) have no instance querying default metrics. I would like to be able to config only one of my instances to do that, and it would be pretty easy if I could set the option individually for each telemetry poller instance on its init.

Sorry, I am still not sure I follow. Only the built-in poller may handle VM metrics. Enabling or disabling it only changes the built-in one. Therefore, this is not true:

a) have all the multiple instances querying default metrics

If you leave the built-in poller enabled, your custom pollers won't be re-emit the VM metrics.

I will try to reproduce this behaviour tomorrow and follow up here. Thanks for being so attentive.

Ping. :)

I was trying to reproduce and found out I was wrong in my first analysis.

:telemetry_poller starts a default poller under its application. I thought it would add default measurements to all instances. We may close this. Sorry for bothering.