Since you mention "celery" I *guess* you are probably writing Python code, and I *guess* you are using the Python client library for prometheus. Whether you are exposing metrics via direct HTTP scrape, or using push_gateway, I don't know.
Give that your question is (probably) about programming with the Python client library, then I think the starting point should be to show the code that you've written so far, and explain how it doesn't do what you want.
Also, if you can explain what it is you're trying to achieve, there may be a different and better way to solve your issue. For example, are you trying to expose a metric for the number of active celery tasks? If so, using an existing exporter which converts celery status into prometheus metrics may be a better solution: e.g.