lib/ting_yun/agent/transaction.rb in tingyun_rpm-1.3.1 vs lib/ting_yun/agent/transaction.rb in tingyun_rpm-1.4.1

- old
+ new

@@ -73,10 +73,11 @@ @attributes = TingYun::Agent::Transaction::Attributes.new @apdex = TingYun::Agent::Transaction::Apdex.new(options[:apdex_start_time], @start_time) @has_children = false @category = category + @is_mq = options[:mq] || false @guid = client_transaction_id || generate_guid @frame_stack = [] @frozen_name = nil @base_quantile_hash = {} @@ -95,10 +96,13 @@ def request_port @request_attributes && @request_attributes.port end + def frozen_name=(name) + @frozen_name = name + end def start(state) return if !state.execution_traced? ::TingYun::Agent.instance.events.notify(:start_transaction) # Dispatcher调用 @@ -115,11 +119,11 @@ def stop(state, end_time, outermost_frame, summary_metrics = []) freeze_name_and_execute - if @has_children + if @has_children or @is_mq name = Transaction.nested_transaction_name(outermost_frame.name) trace_options = TRACE_OPTIONS_SCOPED else name = @frozen_name trace_options = TRACE_OPTIONS_UNSCOPED @@ -139,10 +143,10 @@ summary_metrics_with_exclusive_time, outermost_frame, trace_options, end_time.to_f) - commit(state, end_time, name) unless ignore(best_name) + commit(state, end_time, name) end def commit(state, end_time, outermost_node_name)