Sha256: 4b40810a75d2dfa303a7d5e6491e88b07486f0857cff3e995db63e2b33090a9a
Contents?: true
Size: 797 Bytes
Versions: 24
Compression:
Stored size: 797 Bytes
Contents
namespace :newrelic do desc 'Notifies New Relic that a deployment has occurred' task notice_deployment: :environment do begin require 'newrelic_rpm' require 'new_relic/cli/command' appname = ENV.fetch('NEW_RELIC_APP_NAME') Rails.logger.info("Notifying New Relic of deployment to #{appname}") NewRelic::Cli::Deployments.new( environment: Rails.env.to_s, revision: ENV.fetch('SOURCE_VERSION', 'unknown'), changelog: '', description: '', appname: appname, user: '', license_key: ENV.fetch('NEW_RELIC_LICENSE_KEY') ).run rescue => e Rails.logger.error("Failed to notify New Relic (#{e.class.name}: #{e.message})") Rails.logger.info(e.backtrace.take(10).join("\n")) end end end
Version data entries
24 entries across 24 versions & 1 rubygems