GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixed prometheus multiprocessing registry by FadingFog · Pull Request #620 · taskiq-python/taskiq

Conversation

@FadingFog

@FadingFog FadingFog commented May 7, 2026

Copy link
Copy Markdown
Contributor

Replaces global prometheus REGISTRY with a new CollectorRegistry

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FadingFog
Fixed prometheus multiprocessing registry
9c77959
@codecov

codecov Bot commented May 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.79%. Comparing base (3f1d0d1) to head (7e30af2).

Files with missing lines Patch % Lines
taskiq/middlewares/prometheus_middleware.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #620      +/-   ##
==========================================
- Coverage   79.82%   79.79%   -0.04%     
==========================================
  Files          69       69              
  Lines        2528     2529       +1     
==========================================
  Hits         2018     2018              
- Misses        510      511       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@s3rius

s3rius commented May 8, 2026

Copy link
Copy Markdown
Member

First off, can you please run uv run pre-commit run -a to fix errors.

And, second thing. Can you please tell me how to run it properly? Because right now with the following code:

from taskiq_redis import ListQueueBroker

from taskiq.middlewares import PrometheusMiddleware

broker = ListQueueBroker("redis://localhost").with_middlewares(PrometheusMiddleware())

If you run it with

taskiq worker a:broker

Then localhost:9000 returns empty page.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@FadingFog
Refactored via pre-commit
7e30af2
@FadingFog

FadingFog commented May 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

First off, can you please run uv run pre-commit run -a to fix errors.

Fixed

Then localhost:9000 returns empty page.

It's happening because we create a new registry that doesn't have default python metrics, so there're no metrics at the time of worker startup. You can execute a task and then the metrics will be populated

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@s3rius

s3rius commented May 8, 2026

Copy link
Copy Markdown
Member

Yeah, I tested it out, looks good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

s3rius
s3rius approved these changes May 8, 2026
View reviewed changes
@s3rius
s3rius merged commit 442621d into taskiq-python:master May 8, 2026
33 of 35 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waza-ari waza-ari mentioned this pull request Oct 13, 2026
Issue starting worker with PrometheusMiddleware #173
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@s3rius s3rius s3rius approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FadingFog @s3rius
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.