Class: NewRelic::Agent::Thread
- Inherits:
-
Thread
- Object
- Thread
- NewRelic::Agent::Thread
- Defined in:
- lib/new_relic/agent/thread.rb
Class Method Summary collapse
- .bucket_thread(thread, profile_agent_code) ⇒ Object
- .scrub_backtrace(thread, profile_agent_code) ⇒ Object
Instance Method Summary collapse
-
#initialize(label) ⇒ Thread
constructor
A new instance of Thread.
Constructor Details
Class Method Details
.bucket_thread(thread, profile_agent_code) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/new_relic/agent/thread.rb', line 11 def self.bucket_thread(thread, profile_agent_code) if thread.key?(:newrelic_label) return profile_agent_code ? :agent : :ignore elsif !thread[:newrelic_metric_frame].nil? thread[:newrelic_metric_frame].request.nil? ? :background : :request else :other end end |
.scrub_backtrace(thread, profile_agent_code) ⇒ Object
21 22 23 24 |
# File 'lib/new_relic/agent/thread.rb', line 21 def self.scrub_backtrace(thread, profile_agent_code) return thread.backtrace if profile_agent_code thread.backtrace.select {|t| t !~ /\/newrelic_rpm-\d/ } end |