darion-yaphet commented on PR #3643: URL: https://github.com/apache/brpc/pull/3643#issuecomment-6358121524
In the original startup process, when traversing the method table, MethodStatus::Expose() would be called for both entry points separately. Since they point to the same object, it is equivalent to publishing the same set of bvars twice consecutively. The problem in the second publication: ``` The expose of bvar will first hide the previous publication and then re-register. Between these two operations, the metric will briefly disappear. If Prometheus happens to capture it during this window, it may miss the metrics of that method. ``` The fix is quite simple: When traversing the method table, only publish metrics through the entry points where `own_method_status` is true. The short name can still be used to find the method, but the same status object will not be re-registered again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
