Sha256: bf81c66687a54a1029e35f3a2d82f49e7c7063957f5617466cc9592767c6a726
Contents?: true
Size: 497 Bytes
Versions: 12
Compression:
Stored size: 497 Bytes
Contents
require 'rubygems' # Ran with: # rackup -p 8000 ./examples/integration/rack_middleware.ru # # Make requests to: http://localhost:8000/ # See stats at : http://localhost:8000/stats require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'ruby-metrics') @agent = Metrics::Agent.new counter = @agent.counter(:my_counter) use Metrics::Integration::Rack::Middleware, :agent => @agent app = proc do |env| counter.incr [200, {'Content-Type' => 'text/plain'}, ["Counted!"]] end run app
Version data entries
12 entries across 12 versions & 2 rubygems