arl / statsviz

🚀 Visualise your Go program runtime metrics in real time in the browser
MIT License
3.21k stars 121 forks source link

add echo example #22

Closed diendv96 closed 3 years ago

diendv96 commented 4 years ago

add example for integrate statsviz to echo based application

codecov-io commented 4 years ago

Codecov Report

Merging #22 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   72.06%   72.06%           
=======================================
  Files           4        4           
  Lines         247      247           
=======================================
  Hits          178      178           
  Misses         63       63           
  Partials        6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update beb7e11...1bba511. Read the comment docs.

arl commented 4 years ago

@diendang271 the example runs and compiles but if if point my browser to http://localhost:1323/debug/statsviz I'm not seeing statsviz web interface, I'm seeing {"message":"Not Found"}. What url should I point my browser to in order to access statsviz interface?

ronaudinho commented 3 years ago

sorry for barging in, I stumbled upon this, perhaps the issue is because echo is started before the routes are set up i.e e.Start() should be on the last line.

diendv96 commented 3 years ago

Hi @arl,

sorry for barging in, I stumbled upon this, perhaps the issue is because echo is started before the routes are set up i.e e.Start() should be on the last line.

Yes. You are right. echo.Start() should be on the last line. I updated that. Now you can visit http://localhost:1323/debug/statsviz/

arl commented 3 years ago

@diendang271 Thank you :+1: