lib/logjam_agent/request.rb in logjam_agent-0.32.4 vs lib/logjam_agent/request.rb in logjam_agent-0.33.0

- old
+ new

@@ -15,10 +15,11 @@ @forwarder = Forwarders.get(app, env) @lines = [] @uuid = LogjamAgent.generate_uuid @fields = initial_fields.merge(:request_id => @uuid, :host => LogjamAgent.hostname, :process_id => Process.pid, :lines => @lines) + @fields[:trace_id] ||= @uuid unless (revision = LogjamAgent.application_revision).blank? @fields[:revision] = revision end if ENV['CLUSTER'] @fields[:cluster] = ENV['CLUSTER'] @@ -66,9 +67,13 @@ @fields[:caller_id] end def caller_action @fields[:caller_action] + end + + def trace_id + @fields[:trace_id] end def add_line(severity, timestamp, message) @mutex.synchronize do if @bytes_all_lines > @max_bytes_all_lines