lib/plain_apm/agent.rb in plain_apm-0.5.1 vs lib/plain_apm/agent.rb in plain_apm-0.5.2
- old
+ new
@@ -34,15 +34,19 @@
"hostname" => Socket.gethostname,
"pid" => Process.pid,
"thread_id" => Thread.current.object_id.to_s,
)
- @events << event
+ @events << event
end
def start
+ # Already running
return unless @publisher.nil?
+
+ configure
+
return unless @config.enabled
# TODO: sized queue w/ a timeout.
@events = Thread::Queue.new
@@ -55,14 +59,11 @@
at_exit { shutdown }
end
private
- def initialize
- # TODO: validate config
+ def configure
@config = Config.new
-
- super
end
def install_hooks
[
Hooks::Deploy,