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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f2c893cb28bf60914cc72261d5092185894366c
4
- data.tar.gz: 598a0176686af5ffe7206a1a933c1d74295e11bb
3
+ metadata.gz: 1c8290abae869276b264d05b55064c12e08c0e7b
4
+ data.tar.gz: d70bca63396cae22a58c1118e18e78c7708d4173
5
5
  SHA512:
6
- metadata.gz: 3c550393fd8fc5d74777a4d655a1b05d4416798781b002388c719cb9d71f4ed8201c6054e574e3c663ac88f5e1cf6d6ef4187846d5e522853ddbc71274d53d92
7
- data.tar.gz: 6f741f0b59f14cda66c95464e178e214938ea8135988456ef4c3d9775a1259fcd9495af2f53578558baaf0f163c35e8ca4702f2fd3ba3c502e917562776f0d5e
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
 
@@ -18,7 +18,7 @@ module Wildsight
18
18
  :message => msg.to_s.strip
19
19
  }
20
20
  context = @context || Wildsight::Context.detect
21
- context.event(:log, payload) if context
21
+ context.event(:log, payload, {}) if context
22
22
  return nil
23
23
  end
24
24
 
@@ -12,7 +12,7 @@ module Wildsight
12
12
  response = context.profiler.duration(:rails) { @app.call(env) }
13
13
  return response
14
14
  rescue Exception => e
15
- context.event(:exception, extract(e))
15
+ context.event(:exception, {}, extract(e))
16
16
  raise e
17
17
  end
18
18
 
@@ -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
- context.event(:action_controller, context.data[:rack])
58
-
57
+ values = {}
59
58
  context.profiler.data.keys.each do |key|
60
- context.metric("rails.#{key}", context.profiler.data[key][:duration])
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
 
@@ -1,3 +1,3 @@
1
1
  module Wildsight
2
- VERSION = '0.1.21'
2
+ VERSION = '0.1.22'
3
3
  end
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.21
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-26 00:00:00.000000000 Z
12
+ date: 2016-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json