-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat(metrics): Add queue depth metrics #198
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,8 @@ export class BundleDataImporter { | |
await this.queue.drained(); | ||
log.debug('Stopped successfully.'); | ||
} | ||
|
||
queueDepth(): number { | ||
return this.queue.length(); | ||
} | ||
Comment on lines
+138
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method The implementation of Consider adding unit tests to verify the behavior of the |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,4 +121,8 @@ export class TransactionFetcher { | |
await this.queue.drained(); | ||
log.debug('Stopped successfully.'); | ||
} | ||
|
||
queueDepth(): number { | ||
return this.queue.length(); | ||
} | ||
Comment on lines
+125
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method The implementation of Consider adding unit tests to verify the behavior of the |
||
} |
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.
Function
registerQueueLengthGauge
implemented correctly, consider handling duplicates.The implementation of
registerQueueLengthGauge
is correct and effectively registers queues for monitoring. However, consider adding error handling or a check to prevent potential issues if a queue with the same name is registered multiple times.Consider implementing a mechanism to handle duplicate queue names to prevent unintended overwrites. This could be a simple check before adding the queue to the
queues
object.