This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| perform_action -> #<(NewRelic::Agent::Instrumentation::ControllerInstrumentation)#perform_action> | |
| perform_action_without_benchmark -> #<(ActionController::Filters::InstanceMethods)#perform_action_without_benchmark> | |
| perform_action_without_filters -> #<ActionController::Base#perform_action_without_filters> | |
| perform_action_without_flash -> #<(ActionController::Rescue)#perform_action_without_flash> | |
| perform_action_without_newrelic_trace -> #<(ActionController::Flash::InstanceMethods)#perform_action_without_newrelic_trace> | |
| perform_action_without_rescue -> #<(ActionController::Benchmarking)#perform_action_without_rescue> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Papertrail | |
| module Zookeeper | |
| module Convenience | |
| def assign(key, value, options = {}) | |
| set(key, value, options) | |
| rescue ZK::Exceptions::NoNode | |
| begin | |
| create(key, value, options) | |
| rescue ZK::Exceptions::NodeExists | |
| set(key, value, options) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'thread' | |
| # This seems to crash 1.8.7 | |
| 10.times { Thread.new { Queue.new.pop } } | |
| Process.waitpid fork { GC.start; puts "In child: #{$$}" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load plugin | |
| load 'boundary' | |
| # Notify boundary with your orgid, apikey | |
| boundary.register 'cdd7261592bca18539eae9bb5f1bcfdd', 'f9e6282c4727c5733585a4be86e0f990' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Cubism source for Papertrail | |
| * https://papertrailapp.com/ | |
| */ | |
| cubism.context.prototype.papertrail = function(token) { | |
| var source = {}; | |
| source.metric = function(expression, title) { | |
| var lookup = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Simple Boundary client | |
| # | |
| class BoundaryClient | |
| def initialize(orgid, apikey) | |
| @orgid = orgid | |
| @apikey = apikey | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| # setup | |
| # | |
| require 'fileutils' | |
| script = File.expand_path(__FILE__).gsub(%r|\breleases/\d+\b|, 'current') | |
| script_dir = File.dirname(script) | |
| rails_root = File.dirname(script_dir) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'lazy' | |
| require 'system_timer' | |
| class LibratoMetric | |
| COUNT = 10 | |
| RESOLUTION = 1 | |
| def initialize(metric_name, timeout = 4) | |
| @metric_name = metric_name | |
| @timeout = timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :redis_failover do | |
| task :monitor_client do | |
| require 'redis_failover' | |
| zookeepers = ENV['ZOOKEEPERS'] | |
| if !zookeepers && zookeepers_file = ENV['ZOOKEEPERS_FILE'] | |
| if File.exists?(zookeepers_file) | |
| zookeepers = File.read(zookeepers_file).chomp | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| God.watch do |w| | |
| w.name = 'remote_syslog' | |
| w.interval = 7.seconds | |
| w.log = File.join(RAILS_ROOT, 'log', "#{w.name}-god.log") | |
| w.dir = RAILS_ROOT | |
| w.start = "bundle exec remote_syslog --tls -D -c #{RAILS_ROOT}/config/remote_syslog.yml" |