-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Meter for in-progress jobs #139
Conversation
Sources/Queues/QueueWorker.swift
Outdated
Timer( | ||
label: "\(jobName).jobDurationTimer", | ||
label: "\(jobName).duration.timer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this can be considered a breaking change, but people who use this might have to switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would break integrations. SemVer wise it's technically fine but it could cause issues. We're not actually changing any information here right? Though the display unit was incorrect before right?
@maciejtrybilo you're using this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the name back. The display unit is probably worth keeping as seconds is just not a great metric for job duration IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would break integrations. SemVer wise it's technically fine but it could cause issues. We're not actually changing any information here right? Though the display unit was incorrect before right?
@maciejtrybilo you're using this correct?
I am, but it's no catastrophe to change the units. I'm good!
dimensions: [ | ||
("success", error == nil ? "true" : "false"), | ||
("jobName", jobName), | ||
], | ||
preferredDisplayUnit: .seconds | ||
preferredDisplayUnit: .milliseconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
==========================================
+ Coverage 84.48% 84.57% +0.08%
==========================================
Files 22 22
Lines 709 765 +56
==========================================
+ Hits 599 647 +48
- Misses 110 118 +8
|
These changes are now available in 1.17.0
This adds a
Meter
metric to record the number of jobs currently being processed by a worker.The gauge also allows calculation of not yet processed but enqueued jobs, since we can now do