Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Proxino -- Monitor and Debug your JavaScript (proxino.com)
105 points by unignorant on June 7, 2012 | hide | past | favorite | 48 comments



For hackers:

    window.onerror = function(m, f, l){
      var err = JSON.encode({ message:m, file:f, line:l })
      (new Image).src = '/errors?e='+err
    }
For Google Analytics users:

    window.onerror = function(m, f, l){
      var err = [f, l, m].join(' : ')
      _gaq.push(['_trackEvent', 'Errors', 'App', err, null, true])
    }
Analytics will allow you to filter by OS, browser, and all the other environment data it already captures. And nice graphs as a bonus :)


Why wrap everything in json? Then you'll just have to decode it on the other end. Just use url parameters, it's what they are for:

    (new Image).src = '/errors?m='+encodeURIComponent(m)+
       '&f='+encodeURIComponent(f)+'&l='+encodeURIComponent(l);
This way it also works on browsers that don't have native JSON (old IE mainly, but also firefox before 3.5). And those are also exactly the browsers where you are likely to get errors since you are probably not testing using them.


Currently it's usually easier to decode JSON than to parse a query string. Modify to taste.

You don't need to encode the strings, the browser will do that for src.


> Currently it's usually easier to decode JSON than to parse a query string.

I don't see how that could be when you anyway have to parse the query string to get the e parameter. It costs nothing extra to get additional parameters.

> You don't need to encode the strings, the browser will do that for src.

Not in my testing - if the error message includes an & it will appear to the webserver as a new url parameter.

And actually that's a bug in your JSON version as well - you need to encode it before sending it.


Yes, I overlooked that. The way I'm doing that right now is with a route /errors/$message, so there's no query string parsing going on.

I also typed encode instead of stringify, and forgot to add a semi-colon after wrapping new Image in parentheses...


How do you keep a nefarious script kiddie from filling up your logs with bogus data? My thoughts were this:

1. Set the window.onerror to immediately push errors to an array 2. Load a small unique script that will create a basic sendError function to post the onerror arguments to an endpoint with a unique csrf set. 3. Loop through the arguments that are queued up and send them to the endpoint. 4. Replace the window.onerror with the sendError function.

Your endpoint can be an API that will log the data to either something like Graylog2 or whatever your favorite logging system is. Not 100% bullet proof but better then nothing.


> How do you keep a nefarious script kiddie from filling up your logs with bogus data?

You don't. Such a behavior is boring to them, so most won't. It does not provide money nor a way into the server, so no motivation.

If they want to DOS you they have many possible methods, adding this doesn't really change anything.


For some reason I thought they were doing more than this, like proxying your JavaScript (hence PROXino), instrumenting it with try/catches to provide robust stack traces, but apparently not: https://www.proxino.com/p.js


That's what the old version of Proxino did... but potential customers didn't like the proxy.


They load in jQuery? That isn't the true third-party javascript way...


Seriously, the beacon/tracker JS requires the whole jQuery (1.7.1)? https://www.proxino.com/p.js


Wow. jQuery is 80% or more of the whole file. It could be loaded asynchronously, and completely avoided if it's already loaded (which is very likely).

Worst of all, it uses exactly one function, jQuery.ajax, which could be replaced with a `new Image; image.src = message` call or a 10 line XHR wrapper.


Yes, fixing this is high on my todo list. I chose to launch first anyway. You know, MVP and all that ;)


And they are not even using a common CDN. Ouch.


There are already services (like Sentry) that track errors well. I want a service that focuses on the non-error logging part.

I typically develop my JS with a lot of console.log calls. Let's say a hundred at page load, and more for each user action, and when there's new data coming down from the server. I'm trying to fix a bug that my friend is having on my new project, but I can't reproduce it locally. I want to see those console logs from her sessions. There's no tool that's designed for this right now. For example, most analytics platforms send an HTTP request on every event.

I'm already using this wrapper http://paulirish.com/2009/log-a-lightweight-wrapper-for-cons..., which wraps console.log and keeps a history client-side. That would be a good starting point. Just push that history up to the server, up to once a second or so.

I should be able to filter by user and browser window session, and ideally other features of the client or log contents, but really the user+browser session are the most important.

Does a good solution exist?


Not feasible for most apps, but if you already have a websocket open, just stream the logs back to the server. Be prepared to store massive amounts of data even for a few hundred clients.


In the Proxino video, I believe it said you can log arbitrary messages which can then be accessed via the web backend. You could probably just make a wrapper for console.log which both pushes the message to Proxino and logs it in the console.


Yes, I saw that. I'm hoping Proxino will add more structure to that data and ways to interact with it.


Personally, I use Loggr (http://loggr.net) for tracking errors and events. You can tag your events however you want so it is really easy to track user sessions and so on.



Wow, that looks cool. Thanks.


More and more of the world is occurring in browsers in javascript, so this problem is important! I'm going to try it out.


@unignorant are you the dude in the demo video? I haven't met a more modle-esque JS developer.


Yes, I am.


Awesome~


I think you could better communicate potential objections and overcome them with your copy/video.

One I have is, how's this going to impact performance?

Also, once I sign up for the free trial, I'm presented with an account screen but not really told what to do next. Sure, I figured it out, but I think it should be more welcoming.

Good luck! I may use this.


One more suggestion, don't send emails from noreply@proxino.com. Especially considering that your registration email comes from here, and is sent to potential customers who may have a quick question before buying.

noreply@ says you don't want to talk to me.

Make is easy to answer questions and help people. Utilize a tool like Zendesk, if needed.


Great suggestion. Thanks!


How does this compare with http://errorception.com/ ?


I've only played with both for a few days, but to summarise: Proxino's UI is drastically nicer, whereas errorception has been around longer and is more reliable.

Proxino is still in beta, so I wouldn't use it for mission-critical websites yet. But Proxino seems to be fixing problems and iterating quickly.


Who made your demo video? It is quite good.


Thank you :) It was an in-house production.


I'm curious how much effort it needed. The images where beautiful and professional. Excellent work.

The voice was lacking some testosterone, but it's a detail. I'm sorry about the critics on the technical aspect of your app. There are indeed some true JS hackers around. I hope you get over it and collect all the good ideas to enhance your product.

I'm no JS hacker and I wasted allot of time trying to figure out why m app wasn't doing what I expected it to do. There is a problem there that needs a solution. As you see hackers have their own tricks to get around this problem. Collecting them and offering them in one plug and play product would be very usefull for all the people out there who aren't hackers.


Literally.


Looking forward to trying it out, but the fact 'localhost' is not changeable is tough since nothing I build is direct on 'localhost'. typically it's site.dev or a local version of the site.com hostname, sometimes with a port to better simulate the real project. any chance you can add the option to change the 'localhost' on the fly in your console?


Good point... I will likely fix this.


fantastic, thanks for the quick reply. best of luck with the launch!


How does this work with minified/obfuscated production code? Some of the other comments suggest that proxino is listening to and logs on 'window.onerror'. If that is the case, I don't think you can get stack traces in all browsers, and the line number for a minified file will alway be 1.


Hmmm. Didn't this launch like a year ago? I remember emailing them about some questions I had a couple times and never got a reply, I assumed they shut down. Too bad since during this time a few competitors have come up: Sentry, ExceptionHub, etc


This is a new product (made by one of the same people) with the same (old) name. It does have some functionality in common with the old product.


The only pimple on this beautifully designed site is the lack of a favicon =)


I tried to test this out but even on localhost it kept throwing:

status: "That domain isn't registered..."

And I don't really feel like paying $10 to TEST if the tool really works, let alone if I want to use it. Working demo please.


Did you set the API key? You should be able to test on localhost with a free account. I'm happy to help over email if you like (ethan@proxino.com).


Does this handle cross domain errors? We're currently doing this in house but some of our script errors are very nondescript as some of our JS is hosted on another domain.


Question: The service has a workaround about the errors with the message "Script Error." in scripts hosted on externals domains (for example, a CDN)?


I really like the landing page and the video. I'm not sure how the product itself can be better than window.onerror+Google Analytics though.


doesn't work with mobile browsers(most of them) that don't support window.onerror


exceptionhub.com is also good and gives nice stack traces.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: