Skip to content

Conversation

@Peopl3s
Copy link

@Peopl3s Peopl3s commented Jun 2, 2025

Description

Add Support MultiProcessCollector for BasePrometheusMiddleware

Close #2220

Type of change

  • New feature (a non-breaking change that adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • [] I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
  • I have included code examples to illustrate the modifications

@CLAassistant
Copy link

CLAassistant commented Jun 2, 2025

CLA assistant check
All committers have signed the CLA.

@roma-frolov
Copy link
Collaborator

Thank you very much for your contribution!

We would be happy to accept it, but there are a couple of questions:
Is it really necessary to add support for multiprocess metrics to FastStream Middleware?
Following the documentation it is possible to make this support without changes in FastStream.
To make the support work, you just need to specify the environment variable PROMETHEUS_MULTIPROC_DIR (the folder where prom will save data) and write in your code:

registry = CollectorRegistry()
multiprocess.MultiProcessCollector(registry, path=path)

If we suddenly decide that this change in FastStream is really unnecessary, then maybe you can update the documentation so that users can refer to something to implement multiprocess metrics support in their own?

@Peopl3s
Copy link
Author

Peopl3s commented Jun 6, 2025

If we suddenly decide that this change in FastStream is really unnecessary, then maybe you can update the documentation so that users can refer to something to implement multiprocess metrics support in their own?

@roma-frolov Yeah, sure.

@Peopl3s
Copy link
Author

Peopl3s commented Jun 9, 2025

Add #2275 @Lancetnik @roma-frolov

@Lancetnik
Copy link
Member

I think, we can close this one then

@Lancetnik Lancetnik closed this Jun 9, 2025
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.

Feature:Support MultiProcess Collector for PrometheusMiddleWare

4 participants