Class: CarelessScribe

Inherits:
Object
  • Object
show all
Defined in:
lib/zipkin-tracer/careless_scribe.rb

Overview

Copyright 2012 Twitter Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Instance Method Summary collapse

Constructor Details

#initialize(scribe) ⇒ CarelessScribe

Returns a new instance of CarelessScribe.



16
17
18
# File 'lib/zipkin-tracer/careless_scribe.rb', line 16

def initialize(scribe)
  @scribe = scribe
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



32
33
34
# File 'lib/zipkin-tracer/careless_scribe.rb', line 32

def method_missing(name, *args)
  @scribe.send(name, *args)
end

Instance Method Details

#batch(&block) ⇒ Object



26
27
28
29
30
# File 'lib/zipkin-tracer/careless_scribe.rb', line 26

def batch(&block)
  @scribe.batch(&block)
rescue ThriftClient::NoServersAvailable, Thrift::Exception
  # I couldn't care less
end

#log(*args) ⇒ Object



20
21
22
23
24
# File 'lib/zipkin-tracer/careless_scribe.rb', line 20

def log(*args)
  @scribe.log(*args)
rescue ThriftClient::NoServersAvailable, Thrift::Exception
  # I couldn't care less
end