|
|
|
All errors are made by a POST request. This request made on url : /errors/
|
|
|
|
|
|
|
|
h2. Parameters
|
|
|
|
|
|
|
|
To this url you can define this parameters :
|
|
|
|
|
|
|
|
* 'api-key'
|
|
|
|
* 'version'
|
|
|
|
* 'error'
|
|
|
|
** 'message'
|
|
|
|
** 'raised_at'
|
|
|
|
** 'backtrace'
|
|
|
|
** 'request'
|
|
|
|
** 'environment'
|
|
|
|
** 'data'
|
|
|
|
|
|
|
|
h2. Mandatory
|
|
|
|
|
|
|
|
Are mandatory only :
|
|
|
|
* 'raised_at'
|
|
|
|
* 'message'
|
|
|
|
|
|
|
|
h2. Format
|
|
|
|
|
|
|
|
All data are String, but can be Array or Hash too. The list of format are :
|
|
|
|
|
|
|
|
* 'api-key' => STRING, the api-key of project
|
|
|
|
* 'version' => STRING, actually 0.1.0 but can change in future.
|
|
|
|
* 'error' => HASH, it's an hash with all information about error raised, all keys are define like after
|
|
|
|
** 'raised_at' => STRING, date with error is raised in application, use UTC date
|
|
|
|
** 'backtrace' => Array, it's a list of string where each string is a line of backtrace
|
|
|
|
** 'request' => Hash, All information about request
|
|
|
|
** 'environment' => Hash, All information about environment where error raised
|
|
|
|
** 'data' => Hash, What you want.
|
|
|
|
|
|
|
|
h2. Exemple of Hash send by POST
|
|
|
|
|
|
|
|
bc. {'api_key' => api_key,
|
|
|
|
'version' => '0.1.0',
|
|
|
|
'error' => {'message' => /\w+/.gen,
|
|
|
|
'raised_at' => hash.key?(:raised_at) ? hash[:raised_at] : 2.days.ago,
|
|
|
|
'backtrace' => 3.of { /\w+ \w+ \w+/.gen },
|
|
|
|
'request' => {
|
|
|
|
'rails_root' => '/path/to/project',
|
|
|
|
'url' => 'http://localhost/failure?id=123',
|
|
|
|
'params' => {
|
|
|
|
'action' => 'index',
|
|
|
|
'id' => '123',
|
|
|
|
'controller' => 'groups'}},
|
|
|
|
'environment' => {
|
|
|
|
'SERVER_NAME' => 'localhost',
|
|
|
|
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
|
|
|
|
'HTTP_USER_AGENT' => 'Mozilla/5.0',
|
|
|
|
'PATH_INFO' => '/',
|
|
|
|
'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
|
|
|
|
'HTTP_HOST' => 'localhost'},
|
|
|
|
'data' => {}}} |