lib/kafka/datadog.rb in ruby-kafka-0.7.10 vs lib/kafka/datadog.rb in ruby-kafka-1.0.0
- old
+ new
@@ -38,20 +38,20 @@
clear
@statsd = statsd
end
def host
- @host ||= default_host
+ @host
end
def host=(host)
@host = host
clear
end
def port
- @port ||= default_port
+ @port
end
def port=(port)
@port = port
clear
@@ -74,17 +74,9 @@
@tags = tags
clear
end
private
-
- def default_host
- ::Datadog::Statsd.const_defined?(:Connection) ? ::Datadog::Statsd::Connection::DEFAULT_HOST : ::Datadog::Statsd::DEFAULT_HOST
- end
-
- def default_port
- ::Datadog::Statsd.const_defined?(:Connection) ? ::Datadog::Statsd::Connection::DEFAULT_PORT : ::Datadog::Statsd::DEFAULT_PORT
- end
def clear
@statsd && @statsd.close
@statsd = nil
end