• Nick Thomas's avatar
    Fix Gitlab::Metrics metaprogramming magic · 6647542c
    Nick Thomas authored
    On initial startup with no rows in the application_settings table, the
    metaprogramming call to `if enabled?` attempts to create a row. This triggers
    the HTML caching path, which attempts to store metrics.
    
    At this point, not all the methods in `Gitlab::Metrics` have been defined! Move
    `current_transaction` to be defined before running the metaprogramming, to
    avoid a confusing NoMethodError
    6647542c
metrics.rb 4.22 KB