Skip to content

Fix use of dedicated listeners with multiprocess#283

Open
riconnon wants to merge 1 commit into
django-commons:masterfrom
riconnon:multi-process-dedicated-listener
Open

Fix use of dedicated listeners with multiprocess#283
riconnon wants to merge 1 commit into
django-commons:masterfrom
riconnon:multi-process-dedicated-listener

Conversation

@riconnon

Copy link
Copy Markdown

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

riconnon commented Feb 20, 2022

Copy link
Copy Markdown
Author

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

asherf commented Feb 21, 2022

Copy link
Copy Markdown
Member

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

@riconnon

riconnon commented Apr 9, 2022

Copy link
Copy Markdown
Author

@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

tykling commented May 18, 2022

Copy link
Copy Markdown

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

riconnon commented Oct 31, 2024

Copy link
Copy Markdown
Author

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

@neeels

neeels commented Feb 24, 2026

Copy link
Copy Markdown

i accidentally / coincidentally made a similar patch in PR 502, no idea which patch is better.

But apparently maintenance of this repository has ceased, if this problem has not been solved for > 1 year?

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.

4 participants