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 NewRelic::Agent::StatsEngine::Transactions | |
| alias_method :end_transaction, :end_transaction_without_thread_local_cleanup | |
| def end_transaction_with_thread_local_cleanup | |
| end_transaction_without_thread_local_cleanup | |
| Thread.current.keys.each do |key| | |
| Thread.current[key] = nil | |
| end | |
| end | |
| alias_method :end_transaction_with_thread_local_cleanup, :end_transaction | |
| 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
| require 'thread' | |
| class Chunk | |
| def initialize(file, size, offset) | |
| @handle = File.open(file) | |
| @handle.pos = offset | |
| @string = @handle.read(size) | |
| if @string.index("\n") < @string.index(',') | |
| look_back(4) | |
| 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
| defined?(ModuleToInstrument) && ModuleToInstrument.respond_to?(:method_to_decorate) |
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 'new_relic/agent/transaction_info' | |
| require 'new_relic/transaction_analysis' | |
| require 'new_relic/transaction_sample' | |
| require 'new_relic/control' | |
| require 'new_relic/new_relic_service' | |
| module NewRelic | |
| class TestAgent | |
| def initialize | |
| @log = Logger.new('log/newrelic_agent.log') |
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 NewRelic | |
| module Agent | |
| class ErrorCollector | |
| def notice_error(exception, options={}) | |
| return if should_exit_notice_error?(exception) | |
| action_path = fetch_from_options(options, :metric, (NewRelic::Agent.instance.stats_engine.scope_name || '')) | |
| exception_options = error_params_from_options(options).merge(exception_info(exception)) | |
| add_to_error_queue(NewRelic::NoticedError.new(action_path, exception_options, exception)) | |
| exception | |
| rescue => e |
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 "newrelic_noop/version" | |
| require 'new_relic/agent/method_tracer' | |
| module NewrelicNoop; end | |
| Object.class_eval do | |
| include NewRelic::Agent::MethodTracer | |
| add_method_tracer :puts, 'Noop/puts' | |
| 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
| instrumentation | |
| background_task | |
| dj | |
| resque | |
| dispatcher | |
| passenger | |
| unicorn | |
| framework | |
| rails | |
| sinatra |
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 'new_relic/agent/sampler' | |
| module NewRelic | |
| module Agent | |
| module Samplers | |
| class MemorySampler < NewRelic::Agent::Sampler | |
| def self.supported_on_this_platform? | |
| false | |
| end | |
| 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 | |
| require 'yaml' | |
| module Timmy | |
| class Step | |
| def self.set_priority(priority) | |
| @priority = priority | |
| 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
| module Rubinius | |
| BUILD_CONFIG = { | |
| :which_ruby => :ruby, | |
| :build_ruby => "/home/hudson/.rvm/rubies/ruby-1.8.7-p334/bin/ruby", | |
| :build_rake => "rake", | |
| :build_perl => "perl", | |
| :llvm => :prebuilt, | |
| :llvm_configure => "", | |
| :cc => "gcc", | |
| :cxx => "g++", |