WIP: Marginalia
What does this MR do?
Includes Marginalia gem which generates query comments containing various application related context information in the comment. It is very useful for backtracking problematic queries back to the application source. A DB Engineer during an on-call incident will have full context of a query and its application source from the comments.
Assuming there should not be any performance overhead as it does not use ActiveRecord subscriptions and instead patches the raw query generation in AR.
Implementation uses flipper
to enable/disable feature.
Turn on Annotation
::Marginalia.enable_feature
Turn off Annotation
::Marginalia.disable_feature
When feature is on and temporarily inline disable annotation
::Marginalia.without_annotation do
...
end
Closes #60063 (moved)
Edited by Balakumar