lib/skylight.rb in skylight-0.0.13 vs lib/skylight.rb in skylight-0.0.14

- old
+ new

@@ -33,9 +33,21 @@ require 'skylight/normalize' require 'skylight/json_proto' require 'skylight/subscriber' require 'skylight/trace' require 'skylight/worker' + + # Some helper functions + def self.current_endpoint=(name) + if t = Trace.current + t.endpoint = name + end + + name + rescue + nil + ensure + end end if defined?(Rails) require 'skylight/railtie' end