lib/plain_apm/hooks/deploy.rb in plain_apm-0.6.7 vs lib/plain_apm/hooks/deploy.rb in plain_apm-0.7.0

- old
+ new

@@ -4,29 +4,23 @@ # # This enables per-deploy metrics segmentation and checking # for performance regressions. module Hooks class Deploy + include EventAttributes + ## # Collect once, immediately on install. def install collect end def collect result = git_revision || hg_revision || return - tool, revision = *result + _, attrs = attributes_from_deploy(*result) - Agent.instance.collect( - { - "source" => "deploy", - "revision" => revision, - "name" => tool, - "started_at" => Time.now.to_f, - "finished_at" => Time.now.to_f - } - ) + Agent.collect(attrs) end private # TODO: other deploy mechanisms