Git Product home page Git Product logo

log2viz's Introduction

DEFUNCT: log2viz

This project and the log2viz.herokuapp.com service are no longer actively maintained by Heroku.

http://log2viz.herokuapp.com/

Realtime analysis of your Heroku app logs.

Installing Locally

Requirements

Get the code

Clone the repository and install the required gems.

$ git clone [email protected]:heroku/log2viz.git
$ cd log2viz
$ bundle install
$ cp .env.sample .env

Set up OAuth

log2viz uses OAuth to obtain authorization to fetch your application’s logs using the Heroku API. To make this work, you have to register an OAuth client with Heroku. The easiest way to do this is on your account page on the Heroku Dashboard. Enter http://localhost:5000/auth/heroku/callback when prompted for a callback URL. The OAuth developer doc has additional details on client creation and OAuth in general.

When registering the client you get an OAuth client id and secret. Add these as HEROKU_ID and HEROKU_SECRET environment variables to your application’s .env.

Start the server

$ foreman start

And you’re done! Your app will be running at http://localhost:5000

Running on Heroku

Create an application

$ heroku create -a myviz

Create a new OAuth client

Register a new OAuth client as described above, this time using the URL of your publicly running app for the callback, i.e. https://myviz.herokuapp.com/auth/heroku/callback.

And set the appropriate variables on your Heroku app:

$ heroku config:set HEROKU_ID=xxxxxxxx \
	HEROKU_SECRET=xxxxxx 

Deploy

$ git push heroku master

Visit your app at https://myviz.herokuapp.com

Meta

Released under the MIT license.

log2viz's People

Contributors

bdotdub avatar catsby avatar danp avatar dominic avatar friism avatar keithrobinson avatar ntodd avatar raulb avatar schneems avatar steveklabnik avatar tmilewski avatar toreriklinnerud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

log2viz's Issues

Grab previous 1500 log lines to seed initial state

It looks like you start grabbing live data from the logs and start with 0 data, but there's up to 1500 lines of logs that you should be able to grab via API. If you aren't using them already, you could use them to seed the initial data state.

Enforce HTTPS only

Since this app logs into my Heroku account via OAuth, I'd feel best as a user if it enforced HTTPS for all pages:

Utilization -> Dyno Utilization

Someone who saw this, who shall remain nameless, thought utilization was somehow involved with memory. Might be clearer to label it "Dyno Utilization". Or possibly "Process Utilization", but I'm not sure that's very clear.

Previous versions had a definition of utilization on the page, and that might be useful to include again.

Support new runtime metrics format

Looks like the metrics format has changed to be l2met friendly.

2013-03-14T13:10:27+00:00 heroku[web.1]: source=heroku.13355784.web.1.533f14e5-1df6-4108-a550-88330ad749c5 measure=memory_total val=120.26 units=MB

Initial Deploy

Just tried my first deploy of the log2viz app and can't seem to get the callback working. Anyone else running into the error below on heroku or local? I am either able to get this one error or a redirect loop error.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<errors>
<error>Not found</error>
</errors>

Tooltip for "95th Percentile" is confusing

The current tooltip for the "95th percentile" statistic begins with, "The slowest 5% of responses." It could be clarified, "5% of responses are slower than this." or better, just use the definition of percentile, "95% of responses return at least this quickly."

Memory Usage idea

It occurred to me that while having a numeric value for Average and Max is useful to us developer-minded folk, a visual interpretation would likely be quite beneficial to many people.

This might look like a thin bar, the left side indicating 0MB and the far right indicating either 512MB or 1024MB depending on the dyno size. Two markers could be placed on this line to indicate minimum and maximum, which move around upon these metrics being updated. The are of the line between the two might be brighter to indicate relevance.

I say this realizing that we don't have a Min visible right now, but do we have this and it's just hidden? If not, then perhaps the other marker would be the average.

Using this data, in either case, we might even output a concurrent web worker recommendation: "You could fit 4 workers into a single dyno at this rate."

All just thoughts. I just know that people tend to like visuals for this kind of data.

Unable to Create Heroku OAuth Clients

Looks like (as of now, anyhow) it's impossible to create new OAuth clients:

"error":"Sorry, you cannot create OAuth clients at this moment.\nPlease subscribe to the Heroku changelog to be notified when this changes:\nhttps://devcenter.heroku.com/changelog\n"}

^ What I get when attempting the cURL command specified in the readme.

Add loading state

When no data is available, elements have a "loading" class appended to them. Think about initial page display for loading state.

Does not support 2x dynos

The 512Mb "max" RAM is hardcoded which doesn't reflect the state of all dynos running on the platform.

Log2viz dies after running for some hours

I've been keeping a tab open with log2viz running for vault-usage and
noticed that it consistently dies after a few hours. I left it
running with a console open to see if I could get some useful details
which you can see in the attached screenshot. I'm running Firefox
19.0.2 on OS X 10.8.3.

Screen Shot 2013-03-27 at 9 48 55 PM

The app crashes after running for a minute

/Users/tel/code/log2viz/app.rb:136:in `[]': invalid number of elements (0 for 1..2)

This is the offending line (app.rb):

data = Hash[ matches[4].split(/\s+/).map{|j| j.split("=", 2)} ]

Process per dyno number should have tooltip

The process per dyno number is based on

config["UNICORN_WORKERS"] || config["WEB_CONCURRENCY"] || params[:concurrency] || 1

which means that if none of these variables are defined it will just output 1 and this may be wrong (in my case it wrong is since I am running 3 unicorn workers but they are not defined as a config var).

I think a small tooltip will suffice.

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.