lib/new_relic/agent/agent.rb in newrelic_rpm-4.3.0.335 vs lib/new_relic/agent/agent.rb in newrelic_rpm-4.4.0.336
- old
+ new
@@ -375,11 +375,10 @@
end
def should_install_exit_handler?
(
Agent.config[:send_data_on_exit] &&
- !NewRelic::LanguageSupport.jruby? &&
!sinatra_classic_app?
)
end
def install_exit_handler
@@ -541,11 +540,13 @@
@error_collector.drop_buffered_data
@transaction_sampler.reset!
@transaction_event_recorder.drop_buffered_data
@custom_event_aggregator.reset!
@sql_sampler.reset!
- TransactionState.tl_clear
+ if Agent.config[:clear_transaction_state_after_fork]
+ TransactionState.tl_clear
+ end
end
# Clear out state for any objects that we know lock from our parents
# This is necessary for cases where we're in a forked child and Ruby
# might be holding locks for background thread that aren't there anymore.
@@ -801,10 +802,11 @@
:labels => Agent.config.parsed_labels,
:agent_version => NewRelic::VERSION::STRING,
:environment => @environment_report,
:settings => Agent.config.to_collector_hash,
:high_security => Agent.config[:high_security],
- :utilization => UtilizationData.new.to_collector_hash
+ :utilization => UtilizationData.new.to_collector_hash,
+ :identifier => "ruby:#{local_host}:#{Agent.config.app_names.sort.join(',')}"
}
end
# Returns connect data passed back from the server
def connect_to_server