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

Fix use of dedicated listeners with multiprocess #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

riconnon
Copy link

Extract the code to select the registry used for the exporter from the
Django view and provide the registry as a parameter to clients for
deciated listeners as well.

@riconnon riconnon force-pushed the multi-process-dedicated-listener branch from eabe078 to 340a76c Compare August 18, 2021 23:04
@riconnon riconnon force-pushed the multi-process-dedicated-listener branch from 340a76c to 779b7ef Compare February 20, 2022 23:08
@riconnon
Copy link
Author

riconnon commented Feb 20, 2022

Hi @korfuri
I've just rebased this over your latest, and I wondered if you might have time to take a look at this.

For me, without this, I'm unable to make a working setup using multiprocess and dedicated listeners.

@asherf
Copy link
Collaborator

asherf commented Feb 21, 2022

please provide some more context for this change..
What problem does it solve ? what is the use case for this ?

@riconnon
Copy link
Author

riconnon commented Apr 9, 2022

@asherf
I'm using a dedicated WSGI listener for metrics collection, and multiprocess mode to support my WSGI/ASGI running multiple processes.
With the code from master this didn't work, and I ended up with no metrics because the listener was not using the same registry as the multiprocess collector.

@tykling
Copy link

tykling commented May 18, 2022

I think I might be facing this issue. Any update on merging this? @riconnon if you understand the issue well enough maybe you can include a testcase which demonstrates it, although I understand it is not trivial given the nature of multiproc stuff.

@riconnon riconnon force-pushed the multi-process-dedicated-listener branch from 779b7ef to 16aa270 Compare October 8, 2023 19:03
Extract the code to select the registry used for the exporter from the
Django view and provide the registry as a parameter to clients for
deciated listeners as well.
@riconnon riconnon force-pushed the multi-process-dedicated-listener branch from 16aa270 to cfefbd0 Compare October 31, 2024 22:35
@riconnon
Copy link
Author

riconnon commented Oct 31, 2024

@asherf It would be really useful to see this PR reviewed since without it my setup is entirely broken

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

Successfully merging this pull request may close these issues.

3 participants