discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
525 stars 153 forks source link

feat(delayed job): allow to select the modules as part of the jobs name #314

Closed martinramirez7 closed 1 week ago

martinramirez7 commented 3 months ago

This PR allows to use modules as part of jobs names on delayed jobs metrics.

This is useful in apps with several namespaces where each defines the same set of jobs, all running in the same queue, which is our situation.

It ensures backwards compatibility.

martinramirez7 commented 2 months ago

Hey @SamSaffron, can you take a quick look of this please? It seems linter is failing on unchanged files

SamSaffron commented 2 months ago

any chance you can add a test to properly clarify new behavior ?

martinramirez7 commented 2 months ago

Hey Sam, just added the new param to some tests. I don't really understand why the CI's tests are failing, any idea? locally works fine. I believe it has nothing to do with my changes. let me know if I'm wrong

blackjid commented 2 months ago

@martinramirez7 the specs are failing in master also, something changed. But is should be fixed if you add require 'ostruct' to the /test/server/runner_test.rb file.

martinramirez7 commented 2 months ago

@SamSaffron I added a commit that fixes the CI problem with @blackjid suggestion. The problem is due json 2.7.2 doesn't load open struct library by default as it was on 2.7.1. you can see this PR for mor info

martinramirez7 commented 1 month ago

hey @SamSaffron friendly reminder of this PR

blackjid commented 3 weeks ago

@SamSaffron any chance to merge and release this? That would be awesome

SamSaffron commented 1 week ago

thanks ! merged.