lib/elastic_apm/agent.rb in elastic-apm-2.10.0 vs lib/elastic_apm/agent.rb in elastic-apm-2.10.1

- old
+ new

@@ -77,19 +77,28 @@ ) { |event| enqueue event } @metrics = Metrics.new(config) { |event| enqueue event } end # rubocop:enable Metrics/MethodLength - attr_reader :config, :transport, :instrumenter, - :stacktrace_builder, :context_builder, :error_builder, :metrics + attr_reader( + :central_config, + :config, + :context_builder, + :error_builder, + :instrumenter, + :metrics, + :stacktrace_builder, + :transport + ) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength def start unless config.disable_start_message info '[%s] Starting agent, reporting to %s', VERSION, config.server_url end + central_config.start transport.start instrumenter.start metrics.start config.enabled_spies.each do |lib| @@ -102,9 +111,10 @@ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength def stop debug 'Stopping agent' + central_config.stop metrics.stop instrumenter.stop transport.stop self