Method: Wavefront::MetricHelper#initialize
- Defined in:
- lib/wavefront-sdk/metric_helper.rb
#initialize(creds, opts = {}) ⇒ MetricHelper
See Wavefront::Write#initialize for parameters. Additionally, dist_port: proxy port to write distributions to. If this is unset, distributions will not be handled.
21 22 23 24 25 26 27 |
# File 'lib/wavefront-sdk/metric_helper.rb', line 21 def initialize(creds, opts = {}) @opts = opts @buf = { gauges: empty_gauges, counters: empty_counters } @writer = setup_writer(creds, opts) @dist_writer = setup_dist_writer(creds, opts) if opts[:dist_port] end |