Zum Inhalt springen

Missing Query Tag (ARCH6057)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.