Wire metrics into schedulers for replication #9105
Draft
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.
What changed?
Scheduler Metrics Summary
Metrics Added
scheduler_active_workersscheduler_assigned_workersscheduler_queue_depthscheduler_active_queuesscheduler_queue_latencyscheduler_tasks_submittedscheduler_tasks_completedTags
All metrics are emitted with the following base tags:
queue_typereplicationscheduler_typesequential_scheduler,iwrrpriorityhigh,lowAdditional tags for IWRR scheduler metrics:
channel_key<cluster_name>Scheduler Architecture
Metrics by Scheduler Type
SequentialScheduler emits:
scheduler_active_workers- total workers in the poolscheduler_assigned_workers- workers currently processing a queuescheduler_queue_depth- tasks in the dispatch channelscheduler_active_queues- number of workflow-specific queuesscheduler_queue_latency- time from submit to execution startscheduler_tasks_submitted- counter incremented onSubmit()scheduler_tasks_completed- counter incremented onAck()/Nack()InterleavedWeightedRoundRobinScheduler (IWRR) emits:
scheduler_queue_depth- per-channel (per source cluster)scheduler_active_queues- total weighted channelsscheduler_queue_latency- time spent in IWRR channel before dispatchWhy?
Tell your future self why have you made these changes.
How did you test it?
Potential risks
Any change is risky. Identify all risks you are aware of. If none, remove this section.