GithubHelp home page GithubHelp logo

folsom_cowboy's Issues

The project appears to be broken with recent cowboy

The error looks like this:

08:41:57.114 [error] Error in process <0.319.0> with exit value: {{badmatch,false},[{cowboy_router,execute,2,[{file,"src/cowboy_router.erl"},{line,171}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,500}]}]}
08:41:57.118 [error] Supervisor ranch_conns_sup had child ranch_conns_sup started with {ranch_conns_sup,start_protocol,undefined} at <0.319.0> exit with reason no match of right hand value false in cowboy_router:execute/2 line 171 in context child_terminated

May I also suggest you fixing a version of cowboy in your rebar.config?

Folsom has moved

This repo is forked and likely unmaintained.

I no longer have access the folsom related projects and it seems like I probably won't in the near future. To continue maintaining them I have moved the project to https://github.com/folsom-project Please update your projects.

Can't access metric data via REST interface

Hi,

I'm guessing this could be an incompatibility between folsom and folsom_cowboy, but folsom_cowboy doesn't have any tags, so I'm not sure which version I am supposed to use :)

I am able to create a meter metric called msg_per_sec:

folsom_metrics:new_meter(msg_per_sec)

Then I update it every time I receive a new message:

folsom_metrics:notify({msg_per_sec, 1}),

I can see the stats are being collected okay because get_metric_value works fine:

5> folsom_metrics:get_metric_value(msg_per_sec).  

[{count,2257},
 {one,9.793870473767395},
 {five,7.6517299033567285},
 {fifteen,6.22315210736992},
 {mean,9.818651166080544e-6},
 {acceleration,[{one_to_five,0.007140468568035556},
                {five_to_fifteen,0.0023809629933113476},
                {one_to_fifteen,0.003967464851552751}]}]

If I try to look at the available metrics from a browser with "http://localhost:5565/_metrics" I get:

["msg_per_sec"]

But if I try "http://localhost:5565/_metrics/msg_per_sec" I get a 500 error with this in the Erlang console:

14:05:24.844 [error] ** Handler folsom_cowboy_metrics_handler terminating in handle/2
   for the reason error:undef
** Options were []
** Handler state was undefined
** Request was [{socket,#Port<0.4793>},{transport,cowboy_tcp_transport},{connection,keepalive},{pid,<0.371.0>},{method,'GET'},{version,{1,1}},{peer,undefined},{host,[<<"localhost">>]},{host_info,undefined},{raw_host,<<"localhost">>},{port,5565},{path,[<<"_metrics">>,<<"msg_per_sec">>]},{path_info,undefined},{raw_path,<<"/_metrics/msg_per_sec">>},{qs_vals,undefined},{raw_qs,<<>>},{bindings,[]},{headers,[{'Accept-Charset',<<"ISO-8859-1,utf-8;q=0.7,*;q=0.3">>},{'Accept-Language',<<"en-US,en;q=0.8">>},{'Accept-Encoding',<<"gzip,deflate,sdch">>},{'Accept',<<"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8">>},{'User-Agent',<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11">>},{'Connection',<<"keep-alive">>},{'Host',<<"localhost:5565">>}]},{p_headers,[{'Connection',[<<"keep-alive">>]}]},{cookies,undefined},{meta,[]},{body_state,waiting},{buffer,<<>>},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,undefined},{urldecode,{#Fun<cowboy_http.urldecode.2>,crash}}]
** Stacktrace: [{mochinum,digits,[9.889871914675805],[]},{mochijson2,'-json_encode_proplist/2-fun-0-',3,[{file,"src/mochijson2.erl"},{line,167}]},{lists,foldl,3,[{file,"lists.erl"},{line,1197}]},{mochijson2,json_encode_proplist,2,[{file,"src/mochijson2.erl"},{line,170}]},{mochijson2,'-json_encode_proplist/2-fun-0-',3,[{file,"src/mochijson2.erl"},{line,167}]},{lists,foldl,3,[{file,"lists.erl"},{line,1197}]},{mochijson2,json_encode_proplist,2,[{file,"src/mochijson2.erl"},{line,170}]},{folsom_cowboy_metrics_handler,get_request,1,[{file,"src/folsom_cowboy_metrics_handler.erl"},{line,45}]}]

Basically I'm not sure whether it's something I'm doing wrong, a version compatibility issue or something else :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.