[Telemetry] Add Rage::Telemetry.every for periodic block scheduling - #381
Conversation
c21a6e4 to
3f62ca9
Compare
Rage::Telemetry.every for periodic block schedulingRage::Telemetry.every for periodic block scheduling
6791e3a to
0ae3770
Compare
Rage::Telemetry.every for periodic block schedulingRage::Telemetry.every for periodic block scheduling
|
@rsamoilov PR is ready for review. Just a short summary: I added a block to Also, I wrote a test code which passes locally but kept failing in the CI |
|
Sorry for the confusion here. We need to distinguish between |
|
@rsamoilov made the required changes. please have another look whenever you are free. thank you! |
rsamoilov
left a comment
There was a problem hiding this comment.
Great start!
There are several comments, but I've approved the PR. Feel free to either continue here or merge it and tackle those in another one.
Timer blocks currently execute directly on the reactor thread in the root fiber. Any blocking I/O in a block - e.g. flushing metrics to a collector via HTTP - stalls the entire reactor and freezes the server. Wrap each execution in Fiber.schedule so blocking operations that go through the fiber scheduler (socket I/O, sleep, DNS) yield to the event loop instead of blocking it.
ab4aab2 to
5bbb9a9
Compare
|
@rsamoilov made the required changes in this PR itself. Please have another look whenever you are free. Thank you! |
What this PR does?
Rage::Telemetry.everynow schedules each tick viaFiber.scheduleinstead of calling the block inline in the root fiberWhy this design?