Module: LightStep
- Extended by:
- SingleForwardable
- Defined in:
- lib/lightstep.rb,
lib/lightstep/span.rb,
lib/lightstep/tracer.rb,
lib/lightstep/version.rb,
lib/lightstep/reporter.rb,
lib/lightstep/global_tracer.rb,
lib/lightstep/transport/nil.rb,
lib/lightstep/transport/base.rb,
lib/lightstep/transport/callback.rb,
lib/lightstep/transport/http_json.rb
Overview
LightStep Tracer
Defined Under Namespace
Modules: Transport Classes: Error, GlobalTracer, Reporter, Span, Tracer
Constant Summary collapse
- VERSION =
'0.9.6'.freeze
Class Method Summary collapse
-
.guid ⇒ Object
Returns a random guid.
-
.instance ⇒ Object
Returns the singleton instance of the Tracer.
-
.micros(time) ⇒ Object
Convert a time to microseconds.
Class Method Details
.guid ⇒ Object
Returns a random guid. Note: this intentionally does not use SecureRandom, which is slower and cryptographically secure randomness is not required here.
28 29 30 31 |
# File 'lib/lightstep.rb', line 28 def self.guid @_rng ||= Random.new @_rng.bytes(8).unpack('H*')[0] end |
.instance ⇒ Object
Returns the singleton instance of the Tracer.
11 12 13 |
# File 'lib/lightstep.rb', line 11 def self.instance LightStep::GlobalTracer.instance end |
.micros(time) ⇒ Object
Convert a time to microseconds
22 23 24 |
# File 'lib/lightstep.rb', line 22 def self.micros(time) (time.to_f * 1E6).floor end |