global_error_handler 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3bfdcc640a0acecd16fb7622c821afa05ec299c
4
- data.tar.gz: d54f255a35cdb52e49f2683f06ffcc5dd15e2a3d
3
+ metadata.gz: dc697465132b68a588542b15cfddc421537b4d69
4
+ data.tar.gz: ee2e3c76923534ed80de41ba447efb7c1c91725f
5
5
  SHA512:
6
- metadata.gz: 8891a983d533f742ea5edc686cbd294b874931ebc3f489b1452942071f4f84dc6d9aecbe3e5e5f6b8ba96b64c41bd192a3405872e7cde4a0160d8b4de3804267
7
- data.tar.gz: 225113b3256269da00210c68d40e8854c5c3f108fd37e83cd705bfa240e740db6aec0d746c528a8d91e613bfe443a0820c25aa08d1af9c4e3c7e16c6f7abfa52
6
+ metadata.gz: 6ed1cc6fb7ef0e723c7917970515ddf6b6a2744cd596a374fa8c9c0f0d168e991dd85d4573504b8b01d077713022fde6c7a51b2583a86d53480f747d79d7b48f
7
+ data.tar.gz: 9d63c33bab0f301dd19f7542ffcf92691a684900315fb3dc1e52907848b453a1816f8c6e8f65079624193aad73985dc23eaf01ff3637f039cafb031fba0c2846
data/README.md CHANGED
@@ -3,6 +3,15 @@
3
3
  GlobalErrorHandler catches application exceptions on the middleware level and store them into the redis database.
4
4
  It adds Exceptions tab to Redis Web server in case to view, filter, delete or truncate them.
5
5
 
6
+ - [Installation](#installation)
7
+ - [Configuration](#configuration)
8
+ - [Usage](#usage)
9
+ - [Exceptions tab](#exceptions-tab)
10
+ - [Truncate / Delete](#truncatedelete-functionality)
11
+ - [RescueFrom](#rescue_from)
12
+ - [Data structure](#data-structure)
13
+ - [Contributing](#contributing)
14
+
6
15
  ## Installation
7
16
 
8
17
  Add this line to your application's Gemfile:
@@ -23,15 +32,47 @@ Add redis database configuration into `global_exceptions_handler` section of _re
23
32
 
24
33
  ## Usage
25
34
 
35
+ ### Exceptions tab
36
+ #### Index page
26
37
  Target your browser to `/resque/exceptions/` path of your Rails Application server to view all Exceptions.
38
+ #### Filters
39
+ There are two types of filtering: by Error Class and Error Message.
40
+ Select any `Error Class Filter` or `Error Message Filter` from drop-down to view filtered exceptions.
41
+ #### Show
42
+ Click on `Timestamp` or `Error Class` hyperlink to view details of the exception.
43
+
44
+ ### Truncate/Delete functionality
45
+ #### Truncate
27
46
  *Truncate all* deletes all Exceptions by filter if filter is selected or _ALL_ Exceptions otherwise.
47
+ #### Delete
48
+ * *Delete* deletes exception from the database.
49
+ * *Delete selected* deletes the selected exceptions from the database. Clicking on the table caption checkbox selects/deselects the list.
28
50
 
51
+ ### rescue_from
29
52
  If `rescue_from` is used in your application, add following line at top of the method specified to `with:` parameter of resque_from helper.
30
53
 
31
54
  ```ruby
32
55
  GlobalErrorHandler::Handler.new(request.env, exception).process_exception!
33
56
  ```
34
57
 
58
+ ## Data structure
59
+ Redis database data structure contains following below keys:
60
+ - 'global_error_handler:current_id' : *STRING* - stores current id of an exception. It is being incremented on adding new exception into database
61
+ - 'global_error_handler:exceptions' : *LIST* - stores all the exception' keys.
62
+ - 'global_error_handler:exception:\<id\>' : *HASH* - exception key, where \<id\>: number from current_id + 1. Exception key consists of the following attributes:
63
+ - id - exception's internal id
64
+ - error_class - `error.class`
65
+ - error_message - `error.message`
66
+ - error_trace - `error.backtrace`
67
+ - user_agent - `request.user_agent`
68
+ - request_method - `request.method`
69
+ - request_params - `request.params`
70
+ - target_url - `request.url`
71
+ - referer_url - `request.referer`
72
+ - user_info - IP Address information
73
+ - timestamp - time when exception was raised
74
+ - 'global_error_handler:filter:\<field\>:\<filter\>' : *LIST* - stores exception' keys that are filtered by field and filter. where \<field\>: either `error_class` or `error_message`, \<filter\>: string stored in the appropriated attribute.
75
+
35
76
  ## Contributing
36
77
 
37
78
  1. Fork it ( https://github.com/kolobock/global_error_handler/fork )
@@ -1,3 +1,3 @@
1
1
  module GlobalErrorHandler
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global_error_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrii Rudenko