class ZuoraConnect::AppInstanceBase
def self.write_to_telegraf(*args)
def self.write_to_telegraf(*args) if ZuoraConnect.configuration.enable_metrics && !defined?(Prometheus) @@telegraf_host = ZuoraConnect::Telegraf.new() if @@telegraf_host == nil unicorn_stats = ZuoraObservability::Metrics.unicorn_listener if defined?(Unicorn) && Unicorn.respond_to?(:listener_names) @@telegraf_host.write(direction: 'Raindrops', tags: {}, values: unicorn_stats) unless unicorn_stats.blank? return @@telegraf_host.write(*args) end end