meter 1.2.5 → 1.2.6

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
  SHA256:
3
- metadata.gz: 9476661d434f9769d38e42d874daa3ab0561a46a06bc11c35fdd914c440e396f
4
- data.tar.gz: 3be994a160d65fbb5c189b785ade69be7d0f74d72cbe91a6bb4d4c7142a3cd3b
3
+ metadata.gz: 8b6db8e65d10c31f0ee741e06764621bb8da09c17212a1952e82539d13001b12
4
+ data.tar.gz: 9a5e43559e1147a2f881b4d52a0a94853479e1585fa0dde228f8f769912e6b91
5
5
  SHA512:
6
- metadata.gz: 78d139ec17af40fc8f1bc1c82428f6378f8c6547e17348ffa38bd3c1957f5298350675503ce8f05a49d9bed3ea03db06e7cb835f829fbc37c20031bfeac87811
7
- data.tar.gz: ad7d717a4e2717dffe12389749d30e50c4bc8e6afdb811b4db4f67441b6ee0f55704e7e3e342dea62a1278ee6eafe1acd91b1ec8da602ca195fa7cfdbe80af1c
6
+ metadata.gz: 8d7e63220cb4a41ebc70461f50054ee82590440f44970f11ca2ab4e758c584929ae5ec9d1a8347a94cc9c037b9a035b74247331bc2c21f284077dc261ba401c2
7
+ data.tar.gz: b52c0c3facd07ab34664ee4955932bc1f50cbca56a231e970263d0d82d52cd7a3e5ef809b7f5e4f88404623c714967f688d72ae2d6a7ec0ffaf414d5308f7e0d
@@ -4,24 +4,21 @@ ActiveSupport::Notifications.subscribe /process_action.action_controller/ do |*a
4
4
  controller = payload[:controller]
5
5
  action = payload[:action]
6
6
  format = payload[:format] || 'all'
7
- format = "all" if format == "*/*"
7
+ format = 'all' if format == '*/*'
8
8
  http_status = payload[:status]
9
9
 
10
10
  total_duration = event.duration.to_i
11
11
 
12
- meter_tags = {
12
+ meter_data = {
13
13
  controller: controller,
14
14
  format: format,
15
15
  method: payload[:method],
16
- http_status: http_status
17
- }
18
-
19
- meter_data = {
16
+ http_status: http_status,
20
17
  action: action,
21
18
  path: payload[:path],
22
19
  params: payload[:params].to_query,
23
20
  duration: total_duration
24
21
  }
25
22
 
26
- Meter.log 'requests', tags: meter_tags, data: meter_data
23
+ Meter.log 'requests', data: meter_data
27
24
  end
@@ -27,9 +27,9 @@ module Meter
27
27
 
28
28
  def store_user_agent_data(request)
29
29
  user_agent = UserAgent.parse(request.user_agent)
30
- Meter::MDC.tags['user_agent_name'] = user_agent.browser
31
- Meter::MDC.tags['user_agent_platform'] = user_agent.platform
32
- Meter::MDC.tags['user_agent_bot'] = user_agent.bot?
30
+ Meter::MDC.data['user_agent_name'] = user_agent.browser
31
+ Meter::MDC.data['user_agent_platform'] = user_agent.platform
32
+ Meter::MDC.data['user_agent_bot'] = user_agent.bot?
33
33
  Meter::MDC.data['user_agent_version'] = "#{user_agent.browser}_#{user_agent.version}"
34
34
 
35
35
  Meter::MDC.data['user_agent'] = user_agent.to_s
@@ -37,7 +37,7 @@ module Meter
37
37
 
38
38
  def store_geoip_data(request)
39
39
  lookup = Locality::IP.new request.ip
40
- Meter::MDC.tags['geoip_country'] = lookup.country_name if lookup.country_name
40
+ Meter::MDC.data['geoip_country'] = lookup.country_name if lookup.country_name
41
41
  Meter::MDC.data['geoip_city'] = lookup.city_name if lookup.city_name
42
42
  Meter::MDC.data['geoip_coords'] = "#{lookup.latitude},#{lookup.longitude}" if lookup.latitude && lookup.longitude
43
43
  end
@@ -2,7 +2,7 @@ module Meter
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 5
5
+ TINY = 6
6
6
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bukowskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-13 00:00:00.000000000 Z
11
+ date: 2018-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: useragent