metrician 0.0.1

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.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +65 -0
  5. data/.rubocop_todo.yml +24 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +36 -0
  8. data/Gemfile +1 -0
  9. data/METRICS.MD +48 -0
  10. data/README.md +77 -0
  11. data/Rakefile +12 -0
  12. data/config/metrician.yaml +136 -0
  13. data/gemfiles/Gemfile.4.2.sidekiq-4 +24 -0
  14. data/gemfiles/Gemfile.4.2.sidekiq-4.lock +173 -0
  15. data/gemfiles/Gemfile.5.0.pg +24 -0
  16. data/gemfiles/Gemfile.5.0.pg.lock +182 -0
  17. data/lib/metrician.rb +80 -0
  18. data/lib/metrician/configuration.rb +33 -0
  19. data/lib/metrician/jobs.rb +32 -0
  20. data/lib/metrician/jobs/delayed_job_callbacks.rb +33 -0
  21. data/lib/metrician/jobs/resque_plugin.rb +36 -0
  22. data/lib/metrician/jobs/sidekiq_middleware.rb +28 -0
  23. data/lib/metrician/middleware.rb +64 -0
  24. data/lib/metrician/middleware/application_timing.rb +29 -0
  25. data/lib/metrician/middleware/request_timing.rb +152 -0
  26. data/lib/metrician/reporter.rb +41 -0
  27. data/lib/metrician/reporters/active_record.rb +63 -0
  28. data/lib/metrician/reporters/delayed_job.rb +17 -0
  29. data/lib/metrician/reporters/honeybadger.rb +26 -0
  30. data/lib/metrician/reporters/memcache.rb +49 -0
  31. data/lib/metrician/reporters/method_tracer.rb +70 -0
  32. data/lib/metrician/reporters/middleware.rb +22 -0
  33. data/lib/metrician/reporters/net_http.rb +28 -0
  34. data/lib/metrician/reporters/redis.rb +31 -0
  35. data/lib/metrician/reporters/resque.rb +17 -0
  36. data/lib/metrician/reporters/sidekiq.rb +19 -0
  37. data/lib/metrician/version.rb +5 -0
  38. data/metrician.gemspec +25 -0
  39. data/script/setup +72 -0
  40. data/script/test +36 -0
  41. data/spec/metrician_spec.rb +372 -0
  42. data/spec/spec_helper.rb +23 -0
  43. data/spec/support/database.rb +33 -0
  44. data/spec/support/database.sample.yml +10 -0
  45. data/spec/support/database.travis.yml +9 -0
  46. data/spec/support/models.rb +2 -0
  47. data/spec/support/test_delayed_job.rb +12 -0
  48. data/spec/support/test_resque_job.rb +8 -0
  49. data/spec/support/test_sidekiq_worker.rb +8 -0
  50. metadata +188 -0
@@ -0,0 +1,10 @@
1
+ mysql:
2
+ database: metrician_test
3
+ host: localhost
4
+ username: root
5
+ password:
6
+
7
+ postgresql:
8
+ database: metrician_test
9
+ user:
10
+ password:
@@ -0,0 +1,9 @@
1
+ mysql:
2
+ database: metrician_test
3
+ username: travis
4
+ password:
5
+
6
+ postgresql:
7
+ database: metrician_test
8
+ user: postgres
9
+ password:
@@ -0,0 +1,2 @@
1
+ class User < ActiveRecord::Base
2
+ end
@@ -0,0 +1,12 @@
1
+ class TestDelayedJob
2
+ def initialize(success: false, failure: false, error: false)
3
+ @success = success
4
+ @failure = failure
5
+ @error = error
6
+ end
7
+
8
+ def perform
9
+ return if @success
10
+ raise "bork" if @error
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ class TestResqueJob
2
+ @queue = :default
3
+
4
+ def self.perform(options)
5
+ return if options["success"]
6
+ raise "Test explosion: PC LOAD LETTER" if options["error"]
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ class TestSidekiqWorker
2
+ include Sidekiq::Worker
3
+
4
+ def perform(options = {})
5
+ return if options["success"]
6
+ raise "suck it nerd" if options["error"]
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: metrician
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Expected Behavior
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: instrumental_agent
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.14'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Automatically report the most important metrics about your ruby application,
98
+ from request timing to job execution.
99
+ email:
100
+ - support@instrumentalapp.com
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".rubocop.yml"
108
+ - ".rubocop_todo.yml"
109
+ - ".ruby-version"
110
+ - ".travis.yml"
111
+ - Gemfile
112
+ - Gemfile.lock
113
+ - METRICS.MD
114
+ - README.md
115
+ - Rakefile
116
+ - config/metrician.yaml
117
+ - gemfiles/Gemfile.4.2.sidekiq-4
118
+ - gemfiles/Gemfile.4.2.sidekiq-4.lock
119
+ - gemfiles/Gemfile.5.0.pg
120
+ - gemfiles/Gemfile.5.0.pg.lock
121
+ - lib/metrician.rb
122
+ - lib/metrician/configuration.rb
123
+ - lib/metrician/jobs.rb
124
+ - lib/metrician/jobs/delayed_job_callbacks.rb
125
+ - lib/metrician/jobs/resque_plugin.rb
126
+ - lib/metrician/jobs/sidekiq_middleware.rb
127
+ - lib/metrician/middleware.rb
128
+ - lib/metrician/middleware/application_timing.rb
129
+ - lib/metrician/middleware/request_timing.rb
130
+ - lib/metrician/reporter.rb
131
+ - lib/metrician/reporters/active_record.rb
132
+ - lib/metrician/reporters/delayed_job.rb
133
+ - lib/metrician/reporters/honeybadger.rb
134
+ - lib/metrician/reporters/memcache.rb
135
+ - lib/metrician/reporters/method_tracer.rb
136
+ - lib/metrician/reporters/middleware.rb
137
+ - lib/metrician/reporters/net_http.rb
138
+ - lib/metrician/reporters/redis.rb
139
+ - lib/metrician/reporters/resque.rb
140
+ - lib/metrician/reporters/sidekiq.rb
141
+ - lib/metrician/version.rb
142
+ - metrician.gemspec
143
+ - script/setup
144
+ - script/test
145
+ - spec/metrician_spec.rb
146
+ - spec/spec_helper.rb
147
+ - spec/support/database.rb
148
+ - spec/support/database.sample.yml
149
+ - spec/support/database.travis.yml
150
+ - spec/support/models.rb
151
+ - spec/support/test_delayed_job.rb
152
+ - spec/support/test_resque_job.rb
153
+ - spec/support/test_sidekiq_worker.rb
154
+ homepage: http://instrumentalapp.com/
155
+ licenses:
156
+ - MIT
157
+ metadata: {}
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ - app
163
+ required_ruby_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ requirements: []
174
+ rubyforge_project:
175
+ rubygems_version: 2.5.1
176
+ signing_key:
177
+ specification_version: 4
178
+ summary: Automatic Application Metric Collection for Ruby Applications
179
+ test_files:
180
+ - spec/metrician_spec.rb
181
+ - spec/spec_helper.rb
182
+ - spec/support/database.rb
183
+ - spec/support/database.sample.yml
184
+ - spec/support/database.travis.yml
185
+ - spec/support/models.rb
186
+ - spec/support/test_delayed_job.rb
187
+ - spec/support/test_resque_job.rb
188
+ - spec/support/test_sidekiq_worker.rb