log_parser_notifier 0.0.2 → 0.0.3

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: 9213a37524226aad0ec25aedd8d6475ef1377c3d
4
- data.tar.gz: f36032459de6b50286e479185b07899162dd429e
3
+ metadata.gz: 632606795edfb92f76f27d595eef80c001dac96f
4
+ data.tar.gz: ab0c2e797724b4d0a381a0535c00a71d661842d8
5
5
  SHA512:
6
- metadata.gz: bd618866cfa678af0a200574c57ffa589839eb3ae874f5957a6fe0a8e89ba114bcb309a11ece6611660727828465a0b116d082f4e3563659edd2a1de38e5d180
7
- data.tar.gz: 3d160b6e74efe366bd4cb33fc2fc17cfcdc9db69f25b322d41f2da7a3ff0a8b8c004c90df9ec5101b5b7983d7507d3f98c35f493109d43e2dccb08d186ddcbd6
6
+ metadata.gz: 56b56a62c2bea71934164b0dafacecbe3b0fd206552622b355c654647783b75a610d94c8d7d49f6c5ecc203287b8bdfbfeb408e4b61f89b102454424f88859b4
7
+ data.tar.gz: 922aeedf4c043fdbb6ccc32144e542c4b9fd4ed78d2ed7ce64ce15337bb921030bd5753302596065c234b65a29e801e7bf9c9fd780f4fab39d4cafa91c6f2a42
@@ -19,7 +19,7 @@ module LogParserNotifier
19
19
  tags = %W(controller:#{request[:controller]} action:#{request[:action]} con_act:#{request[:controller]}##{request[:action]})
20
20
 
21
21
  LogParserNotifier.logger.debug("processing request for #{request[:controller]}##{request[:action]} with status: #{request[:status]} it is complete: #{request.completed?}")
22
- if request[:status] >= 200 && request[:status] < 400
22
+ if request.completed? && request[:status] >= 200 && request[:status] < 400
23
23
 
24
24
  statsd.increment 'rails.requests', tags: tags
25
25
  statsd.timing 'rails.load_time', request[:duration] * 1000, tags: tags
@@ -1,3 +1,3 @@
1
1
  module LogParserNotifier
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'request-log-analyzer', '~> 1.13.4'
23
- spec.add_dependency 'slop', '~> 4.2.0'
23
+ spec.add_dependency 'slop', '~> 3.6.0'
24
24
  spec.add_dependency 'dogstatsd-ruby', '~> 1.5.0'
25
25
 
26
26
  spec.add_development_dependency 'bundler', '~> 1.7'
@@ -45,8 +45,8 @@ module LogParserNotifier
45
45
  describe 'partial request (AKA log got read while it was being written)' do
46
46
  it 'should not record partial requests' do
47
47
  @logs = RailsLogRequests.partial_request
48
- expect_any_instance_of(Statsd).to_not receive(:increment)
49
- expect_any_instance_of(Statsd).to_not receive(:timing)
48
+ expect_any_instance_of(Statsd).to_not receive(:increment).with('rails.requests', tags: %w(controller:DashboardController action:index con_act:DashboardController#index))
49
+ expect_any_instance_of(Statsd).to_not receive(:timing).with('rails.load_time', anything, tags: %w(controller:DashboardController action:index con_act:DashboardController#index))
50
50
  end
51
51
  end
52
52
  end
@@ -32,6 +32,15 @@ ActiveRecord::RecordNotFound (Couldn't find Document with 'id'=9293 [WHERE "docu
32
32
 
33
33
  def self.partial_request
34
34
  StringIO.new %Q(I, [2015-08-24T07:36:43.598000 #19020] INFO -- : Started GET "/dashboard" for 50.31.29.217 at 2015-08-24 07:36:43 +0000
35
+ I, [2015-08-24T07:36:43.603000 #19020] INFO -- : Processing by DashboardController#index as HTML
36
+ I, [2015-08-24T07:36:43.666000 #19020] INFO -- : Rendered dashboard/_documents.html.erb (5.0ms)
37
+ I, [2015-08-24T07:36:43.668000 #19020] INFO -- : Rendered dashboard/_subscription.html.erb (1.0ms)
38
+ I, [2015-08-24T07:36:43.669000 #19020] INFO -- : Rendered dashboard/_account.html.erb (2.0ms)
39
+ I, [2015-08-24T07:36:43.670000 #19020] INFO -- : Rendered dashboard/_billing.html.erb (0.0ms)
40
+ I, [2015-08-24T07:36:43.671000 #19020] INFO -- : Rendered dashboard/show.html.erb within layouts/application (11.0ms)
41
+ I, [2015-08-24T07:36:43.677000 #19020] INFO -- : Rendered shared/_gtm.html.erb (0.0ms)
42
+ I, [2015-08-24T07:36:43.683000 #19020] INFO -- : Rendered layouts/_guest_menu.html.erb (3.0ms)
43
+ I, [2015-08-24T07:36:43.598000 #19020] INFO -- : Started GET "/dashboard" for 50.31.29.217 at 2015-08-24 07:36:43 +0000
35
44
  I, [2015-08-24T07:36:43.603000 #19020] INFO -- : Processing by DashboardController#show as HTML
36
45
  I, [2015-08-24T07:36:43.666000 #19020] INFO -- : Rendered dashboard/_documents.html.erb (5.0ms)
37
46
  I, [2015-08-24T07:36:43.668000 #19020] INFO -- : Rendered dashboard/_subscription.html.erb (1.0ms)
@@ -40,6 +49,12 @@ I, [2015-08-24T07:36:43.670000 #19020] INFO -- : Rendered dashboard/_billing.
40
49
  I, [2015-08-24T07:36:43.671000 #19020] INFO -- : Rendered dashboard/show.html.erb within layouts/application (11.0ms)
41
50
  I, [2015-08-24T07:36:43.677000 #19020] INFO -- : Rendered shared/_gtm.html.erb (0.0ms)
42
51
  I, [2015-08-24T07:36:43.683000 #19020] INFO -- : Rendered layouts/_guest_menu.html.erb (3.0ms)
52
+ I, [2015-08-24T07:36:43.684000 #19020] INFO -- : Rendered shared/_contact_number.erb (0.0ms)
53
+ I, [2015-08-24T07:36:43.687000 #19020] INFO -- : Rendered shared/_mega_menu.html.erb (1.0ms)
54
+ I, [2015-08-24T07:36:43.688000 #19020] INFO -- : Rendered documents/_preview.html.erb (0.0ms)
55
+ I, [2015-08-24T07:36:43.692000 #19020] INFO -- : Rendered shared/_contact_number.erb (0.0ms)
56
+ I, [2015-08-24T07:36:43.694000 #19020] INFO -- : Rendered shared/_disclaimer.html.erb (1.0ms)
57
+ I, [2015-08-24T07:36:43.695000 #19020] INFO -- : Completed 200 OK in 91ms (Views: 34.0ms | ActiveRecord: 4.0ms)
43
58
  )
44
59
  end
45
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_parser_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Moore
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0
33
+ version: 3.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0
40
+ version: 3.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dogstatsd-ruby
43
43
  requirement: !ruby/object:Gem::Requirement