module Kafka::Datadog
def clear
def clear @statsd && @statsd.close @statsd = nil end
def host
def host @host ||= ::Datadog::Statsd::DEFAULT_HOST end
def host=(host)
def host=(host) @host = host clear end
def namespace
def namespace @namespace ||= STATSD_NAMESPACE end
def namespace=(namespace)
def namespace=(namespace) @namespace = namespace clear end
def port
def port @port ||= ::Datadog::Statsd::DEFAULT_PORT end
def port=(port)
def port=(port) @port = port clear end
def statsd
def statsd @statsd ||= ::Datadog::Statsd.new(host, port, namespace: namespace, tags: tags) end
def statsd=(statsd)
def statsd=(statsd) clear @statsd = statsd end
def tags
def tags @tags ||= [] end
def tags=(tags)
def tags=(tags) @tags = tags clear end