class Trace::Annotation

These classes all come from Finagle-thrift + some needed modifications (.to_h) Moved here as a first step, eventually move them out of the Trace module

Attributes

timestamp[R]
value[R]

Public Class Methods

new(value) click to toggle source
# File lib/zipkin-tracer/trace.rb, line 55
def initialize(value)
  @timestamp = (Time.now.to_f * 1000 * 1000).to_i # micros
  @value = value
end

Public Instance Methods

to_h() click to toggle source
# File lib/zipkin-tracer/trace.rb, line 60
def to_h
  {
    value: @value,
    timestamp: @timestamp
  }
end