Class: TraceBuilder
- Inherits:
-
Monitor
- Object
- Monitor
- TraceBuilder
- Includes:
- Singleton
- Defined in:
- lib/agent/trace_builder.rb
Constant Summary collapse
- @@server =
Socket.gethostname
- @@pid =
Process.pid.to_s
- @@application =
"myapplication"- @@id =
0- @@random =
rand(10000).to_s
Instance Method Summary collapse
Instance Method Details
#createTrace(frame) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/agent/trace_builder.rb', line 14 def createTrace(frame) synchronize do @@id += 1 Trace.new(@@random + "-" + @@id.to_s, frame.startNanos, @@server + "-" + @@pid, @@application, frame) end end |
#setApplication(app) ⇒ Object
21 22 23 |
# File 'lib/agent/trace_builder.rb', line 21 def setApplication(app) @@application = app end |
#setServer(srv) ⇒ Object
25 26 27 |
# File 'lib/agent/trace_builder.rb', line 25 def setServer(srv) @@server = srv end |