logstash_rails 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +27 -8
  2. data/lib/logstash_rails/version.rb +1 -1
  3. metadata +3 -3
data/README.md CHANGED
@@ -15,10 +15,17 @@ There is no `Logger` configuration, logfile or filter in Logstash required.
15
15
  ## Contents
16
16
 
17
17
  * [Usage](#usage)
18
- * [Configuration](#configurtion)
18
+ * [API](#api)
19
+ * [Configuration](#configuration)
19
20
  * [Examples](#examples)
20
21
  * [Contributing](#contributing)
21
22
 
23
+ ## Features
24
+
25
+ * fine grained control over which events will be subscribed to
26
+ * some json event format normalization to prevent troubles with `Elasticsearch`
27
+ * can be reconfigured at runtime
28
+ * tcp and udp transports for testing
22
29
 
23
30
  ## Usage
24
31
 
@@ -32,23 +39,36 @@ and provide an initializer for configuration.
32
39
 
33
40
  You will have to add redis as a dependency to your application in order to use the redis transport.
34
41
 
42
+ ### API
43
+
44
+ `LogstashRails.configure(options_hash)` returns an configured instance of `LogstashRails::Transport`.
45
+ See [Configuration](#configuration) for the options.
46
+
47
+ `LogstashRails::Transport#destroy` releases all resources (e.g. closes sockets) and unsubscribes
48
+ from all events for this instance.
49
+
35
50
 
36
51
  ### Configuration
37
52
 
38
- `LogstashRails.config` takes an options hash with the following options:
53
+ `LogstashRails.config`takes an options hash with the following options:
39
54
 
40
55
  __transport__
41
56
 
42
- redis, logstash-udp, logstash-tcp and logfile are available
57
+ redis, logstash-udp, logstash-tcp and logfile are available.
58
+
59
+ logstash-tcp and logstash-udp should only be used for testing since they produce significant runtime overhead.
43
60
 
44
61
  __events__
45
62
 
46
63
  list of event name patterns to subscribe to. `Regex` and `String` is
47
- supported.
64
+ supported. Defaults to `[/.*/]`
65
+
66
+ See [Active Support Instrumentation](http://edgeguides.rubyonrails.org/active_support_instrumentation.html)
67
+ for the events that `Rails` emmits.
48
68
 
49
69
  __flatten_params__
50
70
 
51
- `true` or `false`, defaults to false
71
+ `true` or `false`, defaults to true
52
72
 
53
73
  flatten the params hash of `process_action.action_controller` events. This gets rid of collisions in dynamic mappings in ElasticSearch
54
74
 
@@ -84,11 +104,10 @@ logstash-udp:
84
104
  The most basic configuration looks like:
85
105
 
86
106
  ```ruby
87
- LogstashRails.config(transport: :redis)
107
+ LogstashRails.config(transport: :logfile)
88
108
  ```
89
109
 
90
- This will connect to a redis server on _localhost:6379_, use _logstash_ as
91
- key for the redis list to push to and subscribe to _all events_.
110
+ This will write _all_ events to `APP_ROOT/log/logstash_rails.log`
92
111
 
93
112
  A more complete example looks like:
94
113
 
@@ -1,3 +1,3 @@
1
1
  module LogstashRails
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -95,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  segments:
97
97
  - 0
98
- hash: -3099024275490372259
98
+ hash: 3722539195248864863
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  segments:
106
106
  - 0
107
- hash: -3099024275490372259
107
+ hash: 3722539195248864863
108
108
  requirements: []
109
109
  rubyforge_project:
110
110
  rubygems_version: 1.8.24