wildsight 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wildsight/context/context.rb +3 -14
- data/lib/wildsight/context/logger.rb +1 -1
- data/lib/wildsight/rack/bottom_middleware.rb +1 -1
- data/lib/wildsight/rack/top_middleware.rb +4 -3
- data/lib/wildsight/rails/railtie.rb +1 -2
- data/lib/wildsight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c8290abae869276b264d05b55064c12e08c0e7b
|
4
|
+
data.tar.gz: d70bca63396cae22a58c1118e18e78c7708d4173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '028e8cb70e9a316edf8af6f21ddb37957832ecc52deb869e2392025a50b41b73d3bd545982afacfc9e7ee8d8b573f2d6e1512b39988be21c0574852208d89f3b'
|
7
|
+
data.tar.gz: c1ca32e465acf5dcba89e4d7df1ea5c7c8d6d427c38b95c934c4579e29c9b037dbf4c9110c42ced2a1dcfe392e16e60e2a134772a5d9851d935648e466837c76
|
@@ -33,26 +33,15 @@ module Wildsight
|
|
33
33
|
thread.thread_variable_set('wildsight.context', nil)
|
34
34
|
end
|
35
35
|
|
36
|
-
def event(series, data, occurred = DateTime.now, source = Wildsight.source, host = Wildsight.host)
|
36
|
+
def event(series, data, values = {}, occurred = DateTime.now, source = Wildsight.source, host = Wildsight.host)
|
37
37
|
@agent.submit(:events, {
|
38
38
|
host: host,
|
39
39
|
source: source,
|
40
40
|
series: series,
|
41
41
|
context: @name,
|
42
42
|
occurred: occurred,
|
43
|
-
data: data
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
def metric(series, value, data = {}, occurred = DateTime.now, source = Wildsight.source, host = Wildsight.host)
|
48
|
-
@agent.submit(:metrics, {
|
49
|
-
host: host,
|
50
|
-
source: source,
|
51
|
-
series: series,
|
52
|
-
context: @name,
|
53
|
-
occurred: occurred,
|
54
|
-
value: value,
|
55
|
-
data: data
|
43
|
+
data: data,
|
44
|
+
values: values
|
56
45
|
})
|
57
46
|
end
|
58
47
|
|
@@ -54,12 +54,13 @@ module Wildsight
|
|
54
54
|
RESPONSE_EXCLUDE_KEYS.each { |key| context.data[:rack][:response][:headers].delete(key) }
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
values = {}
|
59
58
|
context.profiler.data.keys.each do |key|
|
60
|
-
|
59
|
+
values[key] = context.profiler.data[key][:duration]
|
61
60
|
end
|
62
61
|
|
62
|
+
context.event(:action_controller, context.data[:rack], values)
|
63
|
+
|
63
64
|
return response
|
64
65
|
ensure
|
65
66
|
env.delete(Wildsight::Rack::RACK_ENV_KEY)
|
@@ -97,9 +97,8 @@ module Wildsight
|
|
97
97
|
:name => args[4][:name],
|
98
98
|
:query => args[4][:sql],
|
99
99
|
:connection => args[4][:connection_id].to_s,
|
100
|
-
:duration => (args[2] - args[1]) * 1000
|
101
100
|
}
|
102
|
-
context.event(:active_record, event)
|
101
|
+
context.event(:active_record, event, {duration: (args[2] - args[1]) * 1000})
|
103
102
|
end
|
104
103
|
end
|
105
104
|
|
data/lib/wildsight/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wildsight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Jelen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-07-
|
12
|
+
date: 2016-07-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|