Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for dynamically created processes #53

Closed
pallix opened this issue Feb 18, 2021 · 1 comment
Closed

Support for dynamically created processes #53

pallix opened this issue Feb 18, 2021 · 1 comment

Comments

@pallix
Copy link

pallix commented Feb 18, 2021

My team is creating long-living dynamically created GenServer instances (created with a DynamicSupervisor) when our assets connect to our servers. Looking at the code, and as far as I understand, it is currently not possible to dynamically use telemetry_poller to measure such processes.

Which approach is the best in this case and would that make sense to extend telemetry_poller for this use case? It seems to me that adding an add_measurement call in telemetry_poller.erl would be enough.

Edit: probably not enough since process_info/3 takes a name, so this would not work on unnamed process but you get the idea

@josevalim
Copy link
Contributor

The poller is just a convenience for calling telemetry. If you own the process, then it is probably best for you to invoke the telemetry events themselves and bypass the poller altogether. For example, the processes can invoke their handle_info time to time to dispatch them. It is actually preferrable to using the poller in said cases!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants