thesis / shale

A Clojure-backed replacement for Selenium hubs.
MIT License
14 stars 2 forks source link

Enable logging errors per instance #3

Open mhluongo opened 10 years ago

mhluongo commented 10 years ago

... possibly per-hub as well?

mhluongo commented 10 years ago

I'm thinking something like

> curl -XPOST http://localhost:5000/sessions/<id>/events -d '{"error":"app_specific_error_message", "timestamp":1411727900}'
> curl http://localhost:5000/sessions/<id>/events?count=5
[{"error":"app_specific_error_message", "timestamp":1411727900, "shale:time_received":":2014-09-26T10:39:00Z"}]

WDYT @chris-martin? I figure a format like that will work for eg #12 as well as other services, and if shale keeps ephemeral access to the last X events, it can make routing decisions based on that.

mhluongo commented 10 years ago

We'll probably also need a nodes endpoint

> curl http://localhost:5000/nodes
[{"node":"http://some_host.example.com:5555/wd/hub", "tags":["aws"], "id":"<id>"}]
> curl http://localhost:5000/nodes/<id>/events
[{"error":"app_specific_error_message", "timestamp":1411727900, "shale:time_received":":2014-09-26T10:39:00Z"}]