Fix Simple Example #91

Closed
ryanb opened this Issue Sep 4, 2012 · 4 comments

Projects

None yet

4 participants

@ryanb
ryanb commented Sep 4, 2012

The simple example in the README raises this exception: undefined method map for nil:NilClass (NoMethodError)

The problem seems to be that a :series option is not given to the timeseries_gauge. Here is a working version (taken from doc/minimal_example.rb).

require "fnordmetric"

FnordMetric.namespace :simple do
  timeseries_gauge :unicorns_seen,
    :tick => 30.seconds,
    :calculate => :average,
    :series => [:num_unicorns]

  event :unicorn_seen do
    incr :unicorns_seen, :num_unicorns, rand(5)
  end
end

FnordMetric.standalone
@mcfiredrill
Contributor

👍

@skorfmann
Contributor

Why is this still not updated in the Readme? Just ran into this issue :-/

@skorfmann
Contributor

this can be closed as the referenced pull request was merged in.

@paulasmuth
Owner

Thanks, closed! :)

@paulasmuth paulasmuth closed this Jan 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment