What is metrics_timer_record?

When I am looking around Function Reference at Server Runtime Framework part, I found “metrics_timer_record” func with Add a custom metrics timer. But the example are less information, I do not know how this function can operate. Can some expert can explain this funcation?

Thank you so much!

Hello @whkhk,

metrics_timer_record is a function to report a metric measuring elapsed time, for example you could measure how long some operation took in the runtime and report it to a Prometheus instance using this function.

Hope this clarifies.