Ir al contenido

Missing Query Tag (ARCH6057)

Esta página aún no está disponible en tu idioma.

Key ruby.orm.missing-query-tag · Severity info · Category orm

Terminal queries without a tag/comment for log/APM correlation make slow-query attribution harder. In ActiveRecord annotate adds a source comment to the SQL.

def dashboard_orders
Order.where(status: "open").to_a
end
def dashboard_orders
Order.where(status: "open").annotate("dashboard_orders").to_a
end

Add a tag to terminal queries with annotate to ease source attribution in logs and APM.