logjam_agent 0.9.1 → 0.9.2
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 +8 -8
- data/README.md +30 -26
- data/lib/logjam_agent/rack/logger.rb +1 -1
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDYzMWNjYjFmNzcxZTcxZTE4NGM2MzFlZDMyMDFjMzBmNjk1MGI4NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmU5ZTUwYTFjODkxYzgxZDZhMDkyNzY3YTNlYjZjNGEyZDlhNmRiMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWY1OGE4NGU2MzMyZjM2YWM4NmFmOWZjZjA3OTQwMjZiOGMzY2FmNzM3MjVl
|
10
|
+
MzJiYWRkMmFjMTJlNjZiMWZkYmJmYTc3MzBhYzNjNzNmNDBiNGQ5NjU2YWQw
|
11
|
+
NTRiNDU5OTk4ZjY1ZjhmY2ZkZmYxMDVjYTMxMTc3MjE0NTgzOGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDM2NWQwYjIxMTRkNTJkM2E0MGFiNjNmOTFkMmJhMmQ3ZTI0NWQ4NmY4M2Ex
|
14
|
+
Zjk0OGM5YzBjZWEyM2YzYTE4YTZkY2IyMWMxYjAyZTQ2YmRjNjhjZWQzNThh
|
15
|
+
NmYxN2ZjMWI0MTY3ODRmOTc3MWJmZTU5NjU5OGQwZDkwYWZhNzk=
|
data/README.md
CHANGED
@@ -11,50 +11,54 @@ Currently two alternate mechanisms are available for data transport: AMQP or Zer
|
|
11
11
|
|
12
12
|
For AMQP, add
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
```ruby
|
15
|
+
gem "logjam_agent"
|
16
|
+
gem "bunny"
|
17
|
+
```
|
17
18
|
For ZeroMQ, add
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
```ruby
|
21
|
+
gem "logjam_agent"
|
22
|
+
gem "ffi-rzmq"
|
23
|
+
```
|
21
24
|
|
22
25
|
to your Gemfile.
|
23
26
|
|
24
|
-
Add an initializer
|
25
|
-
|
26
|
-
to your app and configure class LogjamAgent.
|
27
|
+
Add an initializer `config/initializers/logjam_agent.rb` to your app
|
28
|
+
and configure class `LogjamAgent`.
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
```ruby
|
31
|
+
module LogjamAgent
|
32
|
+
# Configure the application name (required). Must not contain dots or hyphens.
|
33
|
+
self.application_name = "myapp"
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
+
# Configure the environment name (optional). Defaults to Rails.env.
|
36
|
+
# self.environment_name = Rails.env
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
+
# Configure request data forwarder for ZeroMQ.
|
39
|
+
add_forwarder(:zmq, :host => "logjam.instance.at.your.org", :port => 9605)
|
38
40
|
|
39
|
-
|
40
|
-
|
41
|
+
# Configure request data forwarder for ZeroMQ.
|
42
|
+
# add_forwarder(:amqp, :host => "message.broker.at.your.org"))
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
+
# Configure ip obfuscation. Defaults to no obfuscation.
|
45
|
+
self.obfuscate_ips = true
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
47
|
+
# Configure cookie obfuscation. Defaults to [/_session\z/].
|
48
|
+
# self.obfuscated_cookies = [/_session\z/]
|
49
|
+
end
|
50
|
+
```
|
49
51
|
|
50
52
|
## Troubleshooting
|
51
53
|
|
52
54
|
If the agent experiences problems when sending data, it will log information to a file named
|
53
|
-
`
|
55
|
+
`logjam_agent_error.log` which you can find under `Rails.root/log`.
|
54
56
|
|
55
57
|
This behavior is customizable via a module level call back method:
|
56
58
|
|
57
|
-
|
59
|
+
```ruby
|
60
|
+
LogjamAgent.error_handler = lambda {|exception| ... }
|
61
|
+
```
|
58
62
|
|
59
63
|
# License
|
60
64
|
|
@@ -134,7 +134,7 @@ module LogjamAgent
|
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
-
if cookie = headers[COOKIE]
|
137
|
+
if (cookie = headers[COOKIE]) && LogjamAgent.obfuscated_cookies.present?
|
138
138
|
headers[COOKIE] = cookie.gsub(PAIR_RE) do |_|
|
139
139
|
LogjamAgent.cookie_obfuscator.filter([[$1, $2]]).first.join("=")
|
140
140
|
end
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|