robert3005 opened a new pull request, #47352:
URL: https://github.com/apache/spark/pull/47352

   What changes were proposed in this pull request?
   
   MetricSystem picks up new metrics from sources that are added throughout 
execution. If you do measurements via dynamic proxies you might not want to 
redeclare all metrics that the proxies will create and you'd prefer them to get 
populated as they're being produced. Right now all sources are processed only 
onceat startup and metrics are picked up only if they have been registered 
statically at compile time. Behaviour I am proposing lets you not have to 
declare metrics in two places.
   
   This had been previously suggested in #18406, #29980, #31267, #35357, 
#36889, #38209, #39755, #41120, #42684, #44315 and #45883.
   Why are the changes needed?
   
   Currently there's no way to access MetricRegistry that MetricsSystem uses to 
hold its state and as such it's not possible to reprocess a source. 
MetricsSystem throws if any metric had already been registered previously.
   
   n.b. the MetricRegistry is added as a constructor argument to make testing 
easier but could as well be accessed via reflection as a private variable.
   Does this PR introduce any user-facing change?
   
   No
   How was this patch tested?
   
   Added tests
   Was this patch authored or co-authored using generative AI tooling?
   
   No


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to