Make sure we run zz_metrics in dev environments
The following discussion from !117253 (merged) should be addressed:
-
@mkaeppler started a discussion: (+2 comments) Forgot to say: I changed this because the test above did not work in my container environment for some reason, running a Puma in
development
. I also think it was unnecessarily complicated. I think the original intention from several years ago was to not run metrics when we're in Rake or Rspec. We can do that more cleanly by performing aRuntime
test.
Several years ago we fixed a problem with loading migration templates in 76c8041b, where templates were not being applied correctly due to class loading order issues. This somehow also led to problems with running the zz_metrics
initializer, in which we initialize some crucial monitoring components such as Rails notification subscribers that are essential for monitoring production traffic.
Due to this fix, these never load in dev
mode, which creates a maintenancetest-gap. We should find a solution that leaves the original issue addressed, but allows us to run zz_metrics
in dev setups.