shadabahmed / logstasher

Awesome rails logs
MIT License
821 stars 136 forks source link

active_record/log_subscriber: preserve db_runtime #148

Closed kyrylo closed 3 years ago

kyrylo commented 5 years ago

Fixes https://github.com/shadabahmed/logstasher/issues/137 (suppress_app_log: true prevent DB timing to be emited)

LogStasher removes all default Rails loggers. ActiveRecord::LogSubscriber was used to set db_runtime for the ActiveSupport::Notifications instrumentation API. Our subclass never populates it, which causes the bug: db_runtime is always 0.

kyrylo commented 5 years ago

The failure doesn't seem to be related to my changes. I can see older builds with a similar error message.

petergoldstein commented 3 years ago

@shadabahmed This was already merged, right? I see the corresponding changes in master. Can this PR be closed?

shadabahmed commented 3 years ago

Yes this is merged too. Closing. Thanks