instana 1.192.1 → 1.193.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +200 -133
  3. data/.gitignore +3 -0
  4. data/.rubocop.yml +10 -1145
  5. data/.rubocop_todo.yml +1140 -0
  6. data/Appraisals +103 -0
  7. data/Gemfile +14 -32
  8. data/LICENSE +2 -1
  9. data/Rakefile +19 -39
  10. data/benchmarks/10k-rack-traces.rb +3 -0
  11. data/benchmarks/Gemfile +4 -0
  12. data/benchmarks/id_generation.rb +4 -0
  13. data/benchmarks/opentracing.rb +4 -0
  14. data/benchmarks/rack_vanilla_vs_traced.rb +3 -0
  15. data/benchmarks/stackprof_rack_tracing.rb +3 -0
  16. data/benchmarks/time_processing.rb +4 -0
  17. data/bin/console +8 -4
  18. data/examples/opentracing.rb +4 -0
  19. data/examples/tracing.rb +4 -0
  20. data/extras/license_header.rb +44 -0
  21. data/gemfiles/.bundle/config +1 -2
  22. data/gemfiles/cuba_30.gemfile +18 -0
  23. data/gemfiles/dalli_20.gemfile +18 -0
  24. data/gemfiles/excon_02.gemfile +18 -0
  25. data/gemfiles/graphql_10.gemfile +18 -0
  26. data/gemfiles/grpc_10.gemfile +18 -0
  27. data/gemfiles/net_http_01.gemfile +17 -0
  28. data/gemfiles/rack_16.gemfile +18 -0
  29. data/gemfiles/rack_20.gemfile +18 -0
  30. data/gemfiles/rails_42.gemfile +21 -0
  31. data/gemfiles/rails_50.gemfile +21 -0
  32. data/gemfiles/rails_52.gemfile +21 -0
  33. data/gemfiles/rails_60.gemfile +21 -0
  34. data/gemfiles/redis_40.gemfile +18 -0
  35. data/gemfiles/resque_122.gemfile +19 -0
  36. data/gemfiles/resque_20.gemfile +18 -0
  37. data/gemfiles/rest_client_16.gemfile +18 -0
  38. data/gemfiles/rest_client_20.gemfile +18 -0
  39. data/gemfiles/roda_20.gemfile +18 -0
  40. data/gemfiles/roda_30.gemfile +18 -0
  41. data/gemfiles/sidekiq_42.gemfile +18 -0
  42. data/gemfiles/sidekiq_50.gemfile +18 -0
  43. data/gemfiles/sinatra_14.gemfile +18 -0
  44. data/instana.gemspec +5 -7
  45. data/lib/instana.rb +3 -0
  46. data/lib/instana/activator.rb +44 -0
  47. data/lib/instana/activators/action_cable.rb +24 -0
  48. data/lib/instana/activators/action_controller_api.rb +21 -0
  49. data/lib/instana/activators/action_controller_base.rb +21 -0
  50. data/lib/instana/activators/action_view.rb +21 -0
  51. data/lib/instana/activators/active_record.rb +21 -0
  52. data/lib/instana/activators/cuba.rb +21 -0
  53. data/lib/instana/activators/dalli.rb +23 -0
  54. data/lib/instana/activators/excon.rb +20 -0
  55. data/lib/instana/activators/graphql.rb +22 -0
  56. data/lib/instana/activators/grpc_client.rb +20 -0
  57. data/lib/instana/activators/grpc_server.rb +20 -0
  58. data/lib/instana/activators/net_http.rb +20 -0
  59. data/lib/instana/activators/rack.rb +16 -0
  60. data/lib/instana/activators/rails.rb +18 -0
  61. data/lib/instana/activators/redis.rb +20 -0
  62. data/lib/instana/activators/resque_client.rb +21 -0
  63. data/lib/instana/activators/resque_worker.rb +33 -0
  64. data/lib/instana/activators/rest_client.rb +20 -0
  65. data/lib/instana/activators/roda.rb +21 -0
  66. data/lib/instana/activators/sidekiq_client.rb +24 -0
  67. data/lib/instana/activators/sidekiq_worker.rb +24 -0
  68. data/lib/instana/activators/sinatra.rb +21 -0
  69. data/lib/instana/agent.rb +3 -0
  70. data/lib/instana/agent/helpers.rb +3 -0
  71. data/lib/instana/agent/hooks.rb +3 -0
  72. data/lib/instana/agent/tasks.rb +3 -0
  73. data/lib/instana/base.rb +3 -0
  74. data/lib/instana/collector.rb +3 -0
  75. data/lib/instana/collectors/gc.rb +3 -0
  76. data/lib/instana/collectors/memory.rb +3 -0
  77. data/lib/instana/collectors/thread.rb +3 -0
  78. data/lib/instana/config.rb +3 -0
  79. data/lib/instana/frameworks/cuba.rb +9 -13
  80. data/lib/instana/frameworks/rails.rb +22 -32
  81. data/lib/instana/frameworks/roda.rb +10 -13
  82. data/lib/instana/frameworks/sinatra.rb +4 -8
  83. data/lib/instana/helpers.rb +3 -0
  84. data/lib/instana/instrumentation/action_cable.rb +53 -0
  85. data/lib/instana/instrumentation/action_controller.rb +84 -0
  86. data/lib/instana/instrumentation/action_view.rb +30 -0
  87. data/lib/instana/instrumentation/active_record.rb +50 -0
  88. data/lib/instana/instrumentation/dalli.rb +10 -18
  89. data/lib/instana/instrumentation/excon.rb +54 -57
  90. data/lib/instana/instrumentation/graphql.rb +19 -18
  91. data/lib/instana/instrumentation/grpc.rb +73 -66
  92. data/lib/instana/instrumentation/instrumented_request.rb +6 -1
  93. data/lib/instana/instrumentation/net-http.rb +46 -47
  94. data/lib/instana/instrumentation/rack.rb +4 -0
  95. data/lib/instana/instrumentation/redis.rb +13 -18
  96. data/lib/instana/instrumentation/resque.rb +17 -50
  97. data/lib/instana/instrumentation/rest-client.rb +5 -17
  98. data/lib/instana/instrumentation/sidekiq-client.rb +3 -9
  99. data/lib/instana/instrumentation/sidekiq-worker.rb +3 -9
  100. data/lib/instana/opentracing/carrier.rb +3 -0
  101. data/lib/instana/opentracing/tracer.rb +3 -0
  102. data/lib/instana/rack.rb +4 -0
  103. data/lib/instana/secrets.rb +10 -7
  104. data/lib/instana/setup.rb +6 -1
  105. data/lib/instana/thread_local.rb +3 -0
  106. data/lib/instana/tracer.rb +3 -0
  107. data/lib/instana/tracing/processor.rb +3 -0
  108. data/lib/instana/tracing/span.rb +3 -0
  109. data/lib/instana/tracing/span_context.rb +3 -0
  110. data/lib/instana/util.rb +4 -41
  111. data/lib/instana/version.rb +4 -1
  112. data/lib/oj_check.rb +3 -0
  113. data/lib/opentracing.rb +3 -0
  114. data/test/activator_test.rb +30 -0
  115. data/test/agent/agent_test.rb +3 -0
  116. data/test/benchmarks/bench_id_generation.rb +3 -0
  117. data/test/benchmarks/bench_opentracing.rb +3 -0
  118. data/test/config_test.rb +3 -0
  119. data/test/frameworks/cuba_test.rb +41 -40
  120. data/test/frameworks/roda_test.rb +43 -41
  121. data/test/frameworks/sinatra_test.rb +64 -64
  122. data/test/instana_test.rb +3 -0
  123. data/test/instrumentation/dalli_test.rb +3 -0
  124. data/test/instrumentation/excon_test.rb +4 -0
  125. data/test/instrumentation/graphql_test.rb +3 -0
  126. data/test/instrumentation/grpc_test.rb +5 -1
  127. data/test/instrumentation/{net-http_test.rb → net_http_test.rb} +4 -0
  128. data/test/instrumentation/{instrumented_request_test.rb → rack_instrumented_request_test.rb} +4 -1
  129. data/test/{frameworks → instrumentation}/rack_test.rb +3 -1
  130. data/test/instrumentation/rails_action_cable_test.rb +131 -0
  131. data/test/{frameworks/rails/actioncontroller_test.rb → instrumentation/rails_action_controller_test.rb} +40 -21
  132. data/test/instrumentation/rails_action_view_test.rb +151 -0
  133. data/test/instrumentation/rails_active_record_test.rb +122 -0
  134. data/test/instrumentation/redis_test.rb +3 -0
  135. data/test/instrumentation/resque_test.rb +6 -11
  136. data/test/instrumentation/{rest-client_test.rb → rest_client_test.rb} +9 -0
  137. data/test/instrumentation/sidekiq-client_test.rb +4 -0
  138. data/test/instrumentation/sidekiq-worker_test.rb +4 -0
  139. data/test/secrets_test.rb +3 -0
  140. data/test/support/apps/active_record/active_record.rb +24 -0
  141. data/test/{servers/grpc_50051.rb → support/apps/grpc/boot.rb} +4 -1
  142. data/test/{apps → support/apps/grpc}/grpc_server.rb +3 -0
  143. data/test/{servers/rackapp_6511.rb → support/apps/http_endpoint/boot.rb} +3 -0
  144. data/test/{servers/rails_3205.rb → support/apps/rails/boot.rb} +10 -13
  145. data/test/{models → support/apps/rails/models}/block.rb +4 -1
  146. data/test/{models → support/apps/rails/models}/block6.rb +3 -0
  147. data/test/support/apps/resque/boot.rb +5 -0
  148. data/test/{jobs → support/apps/resque/jobs}/resque_error_job.rb +3 -0
  149. data/test/{jobs → support/apps/resque/jobs}/resque_fast_job.rb +3 -0
  150. data/test/support/apps/sidekiq/boot.rb +25 -0
  151. data/test/{jobs → support/apps/sidekiq/jobs}/sidekiq_job_1.rb +3 -0
  152. data/test/{jobs → support/apps/sidekiq/jobs}/sidekiq_job_2.rb +3 -0
  153. data/test/{servers → support/apps}/sidekiq/worker.rb +5 -2
  154. data/test/support/helpers.rb +97 -0
  155. data/test/test_helper.rb +27 -144
  156. data/test/tracing/custom_test.rb +3 -0
  157. data/test/tracing/id_management_test.rb +4 -0
  158. data/test/tracing/opentracing_test.rb +3 -0
  159. data/test/tracing/tracer_async_test.rb +3 -0
  160. data/test/tracing/tracer_test.rb +3 -0
  161. metadata +105 -96
  162. data/gemfiles/libraries.gemfile +0 -73
  163. data/gemfiles/rails32.gemfile +0 -51
  164. data/gemfiles/rails42.gemfile +0 -50
  165. data/gemfiles/rails50.gemfile +0 -52
  166. data/gemfiles/rails52.gemfile +0 -52
  167. data/gemfiles/rails60.gemfile +0 -72
  168. data/lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb +0 -58
  169. data/lib/instana/frameworks/instrumentation/action_controller.rb +0 -194
  170. data/lib/instana/frameworks/instrumentation/action_view.rb +0 -43
  171. data/lib/instana/frameworks/instrumentation/active_record.rb +0 -27
  172. data/lib/instana/frameworks/instrumentation/mysql2_adapter.rb +0 -87
  173. data/lib/instana/frameworks/instrumentation/mysql_adapter.rb +0 -62
  174. data/lib/instana/frameworks/instrumentation/postgresql_adapter.rb +0 -103
  175. data/lib/instana/instrumentation.rb +0 -25
  176. data/lib/instana/test.rb +0 -43
  177. data/test/apps/cuba.rb +0 -19
  178. data/test/apps/roda.rb +0 -13
  179. data/test/apps/sinatra.rb +0 -9
  180. data/test/frameworks/rails/actionview3_test.rb +0 -210
  181. data/test/frameworks/rails/actionview4_test.rb +0 -208
  182. data/test/frameworks/rails/actionview5_test.rb +0 -221
  183. data/test/frameworks/rails/activerecord_test.rb +0 -279
  184. data/test/servers/helpers/sidekiq_worker_initializer.rb +0 -27
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,1140 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2021-01-28 16:30:51 UTC using RuboCop version 1.9.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 71
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
13
+ Bundler/OrderedGems:
14
+ Enabled: false
15
+
16
+ # Offense count: 4
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/OrderedDependencies:
21
+ Exclude:
22
+ - 'instana.gemspec'
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: Include.
26
+ # Include: **/*.gemspec
27
+ Gemspec/RequiredRubyVersion:
28
+ Exclude:
29
+ - 'instana.gemspec'
30
+
31
+ # Offense count: 1
32
+ # Cop supports --auto-correct.
33
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
34
+ # SupportedStyles: with_first_argument, with_fixed_indentation
35
+ Layout/ArgumentAlignment:
36
+ Exclude:
37
+ - 'lib/instana/tracer.rb'
38
+
39
+ # Offense count: 10
40
+ # Cop supports --auto-correct.
41
+ Layout/ClosingParenthesisIndentation:
42
+ Exclude:
43
+ - 'test/instrumentation/grpc_test.rb'
44
+
45
+ # Offense count: 14
46
+ # Cop supports --auto-correct.
47
+ Layout/EmptyLineAfterGuardClause:
48
+ Exclude:
49
+ - 'lib/instana/agent.rb'
50
+ - 'lib/instana/instrumentation/graphql.rb'
51
+ - 'lib/instana/instrumentation/instrumented_request.rb'
52
+ - 'lib/instana/instrumentation/rack.rb'
53
+ - 'lib/instana/tracer.rb'
54
+ - 'lib/instana/tracing/span.rb'
55
+ - 'lib/instana/util.rb'
56
+ - 'test/config_test.rb'
57
+
58
+ # Offense count: 2
59
+ # Cop supports --auto-correct.
60
+ Layout/EmptyLineAfterMagicComment:
61
+ Exclude:
62
+ - 'benchmarks/Gemfile'
63
+ - 'instana.gemspec'
64
+
65
+ # Offense count: 3
66
+ # Cop supports --auto-correct.
67
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
68
+ Layout/EmptyLineBetweenDefs:
69
+ Exclude:
70
+ - 'lib/instana/tracing/span.rb'
71
+ - 'test/instrumentation/rack_test.rb'
72
+ - 'test/tracing/tracer_test.rb'
73
+
74
+ # Offense count: 7
75
+ # Cop supports --auto-correct.
76
+ Layout/EmptyLines:
77
+ Exclude:
78
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
79
+ - 'lib/instana/base.rb'
80
+ - 'lib/instana/frameworks/cuba.rb'
81
+ - 'lib/instana/tracing/span.rb'
82
+ - 'test/frameworks/sinatra_test.rb'
83
+ - 'test/instrumentation/rack_test.rb'
84
+ - 'test/tracing/tracer_test.rb'
85
+
86
+ # Offense count: 2
87
+ # Cop supports --auto-correct.
88
+ # Configuration parameters: EnforcedStyle.
89
+ # SupportedStyles: empty_lines, no_empty_lines
90
+ Layout/EmptyLinesAroundBlockBody:
91
+ Exclude:
92
+ - 'benchmarks/opentracing.rb'
93
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
94
+
95
+ # Offense count: 4
96
+ # Cop supports --auto-correct.
97
+ # Configuration parameters: EnforcedStyle.
98
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
99
+ Layout/EmptyLinesAroundClassBody:
100
+ Exclude:
101
+ - 'lib/instana/config.rb'
102
+ - 'lib/instana/helpers.rb'
103
+ - 'test/agent/agent_test.rb'
104
+ - 'test/frameworks/rails/activerecord_test.rb'
105
+
106
+ # Offense count: 1
107
+ # Cop supports --auto-correct.
108
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
109
+ Exclude:
110
+ - 'lib/instana/agent/tasks.rb'
111
+
112
+ # Offense count: 2
113
+ # Cop supports --auto-correct.
114
+ # Configuration parameters: EnforcedStyle.
115
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
116
+ Layout/EmptyLinesAroundModuleBody:
117
+ Exclude:
118
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
119
+
120
+ # Offense count: 8
121
+ # Cop supports --auto-correct.
122
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
123
+ Layout/ExtraSpacing:
124
+ Exclude:
125
+ - 'instana.gemspec'
126
+ - 'lib/instana/instrumentation/excon.rb'
127
+ - 'lib/instana/tracer.rb'
128
+ - 'lib/instana/tracing/span.rb'
129
+ - 'test/support/apps/rails/boot.rb'
130
+ - 'test/tracing/tracer_async_test.rb'
131
+
132
+ # Offense count: 10
133
+ # Cop supports --auto-correct.
134
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
135
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
136
+ Layout/FirstArgumentIndentation:
137
+ Exclude:
138
+ - 'test/instrumentation/grpc_test.rb'
139
+
140
+ # Offense count: 1
141
+ # Cop supports --auto-correct.
142
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
143
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
144
+ Layout/FirstArrayElementIndentation:
145
+ Exclude:
146
+ - 'test/frameworks/rails/activerecord_test.rb'
147
+
148
+ # Offense count: 1
149
+ # Cop supports --auto-correct.
150
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
151
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
152
+ Layout/FirstHashElementIndentation:
153
+ Exclude:
154
+ - 'instana.gemspec'
155
+
156
+ # Offense count: 13
157
+ # Cop supports --auto-correct.
158
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
159
+ # SupportedHashRocketStyles: key, separator, table
160
+ # SupportedColonStyles: key, separator, table
161
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
162
+ Layout/HashAlignment:
163
+ Exclude:
164
+ - 'instana.gemspec'
165
+ - 'test/secrets_test.rb'
166
+
167
+ # Offense count: 9
168
+ # Cop supports --auto-correct.
169
+ # Configuration parameters: IndentationWidth, EnforcedStyle.
170
+ # SupportedStyles: spaces, tabs
171
+ Layout/IndentationStyle:
172
+ Exclude:
173
+ - 'test/support/apps/roda/config.ru'
174
+
175
+ # Offense count: 2
176
+ # Cop supports --auto-correct.
177
+ # Configuration parameters: Width, IgnoredPatterns.
178
+ Layout/IndentationWidth:
179
+ Exclude:
180
+ - 'Appraisals'
181
+ - 'test/support/apps/roda/config.ru'
182
+
183
+ # Offense count: 7
184
+ # Cop supports --auto-correct.
185
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
186
+ Layout/LeadingCommentSpace:
187
+ Exclude:
188
+ - 'benchmarks/10k-rack-traces.rb'
189
+ - 'examples/tracing.rb'
190
+ - 'lib/instana/util.rb'
191
+
192
+ # Offense count: 3
193
+ # Cop supports --auto-correct.
194
+ Layout/LeadingEmptyLines:
195
+ Exclude:
196
+ - 'lib/instana/frameworks/instrumentation/active_record.rb'
197
+ - 'test/frameworks/roda_test.rb'
198
+ - 'test/tracing/id_management_test.rb'
199
+
200
+ # Offense count: 14
201
+ # Cop supports --auto-correct.
202
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
203
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
204
+ Layout/MultilineMethodCallIndentation:
205
+ Exclude:
206
+ - 'lib/instana/frameworks/cuba.rb'
207
+ - 'lib/instana/frameworks/roda.rb'
208
+ - 'lib/instana/frameworks/sinatra.rb'
209
+ - 'lib/instana/instrumentation/instrumented_request.rb'
210
+ - 'lib/instana/secrets.rb'
211
+ - 'lib/instana/util.rb'
212
+
213
+ # Offense count: 5
214
+ # Cop supports --auto-correct.
215
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
216
+ # SupportedStyles: aligned, indented
217
+ Layout/MultilineOperationIndentation:
218
+ Exclude:
219
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
220
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
221
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
222
+ - 'lib/instana/tracing/span.rb'
223
+ - 'lib/instana/util.rb'
224
+
225
+ # Offense count: 25
226
+ # Cop supports --auto-correct.
227
+ Layout/SpaceAfterComma:
228
+ Exclude:
229
+ - 'lib/instana/collector.rb'
230
+ - 'lib/instana/secrets.rb'
231
+ - 'lib/instana/tracing/span.rb'
232
+ - 'test/tracing/custom_test.rb'
233
+ - 'test/tracing/opentracing_test.rb'
234
+
235
+ # Offense count: 3
236
+ # Cop supports --auto-correct.
237
+ # Configuration parameters: EnforcedStyle.
238
+ # SupportedStyles: space, no_space
239
+ Layout/SpaceAroundEqualsInParameterDefault:
240
+ Exclude:
241
+ - 'lib/instana/agent.rb'
242
+
243
+ # Offense count: 29
244
+ # Cop supports --auto-correct.
245
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
246
+ # SupportedStylesForExponentOperator: space, no_space
247
+ Layout/SpaceAroundOperators:
248
+ Exclude:
249
+ - 'benchmarks/id_generation.rb'
250
+ - 'instana.gemspec'
251
+ - 'lib/instana/agent.rb'
252
+ - 'lib/instana/helpers.rb'
253
+ - 'lib/instana/instrumentation/excon.rb'
254
+ - 'lib/instana/tracer.rb'
255
+ - 'lib/instana/tracing/span.rb'
256
+ - 'lib/instana/util.rb'
257
+ - 'test/secrets_test.rb'
258
+ - 'test/support/apps/rails/boot.rb'
259
+ - 'test/tracing/opentracing_test.rb'
260
+ - 'test/tracing/tracer_async_test.rb'
261
+
262
+ # Offense count: 1
263
+ # Cop supports --auto-correct.
264
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
265
+ # SupportedStyles: space, no_space
266
+ # SupportedStylesForEmptyBraces: space, no_space
267
+ Layout/SpaceBeforeBlockBraces:
268
+ Exclude:
269
+ - 'lib/instana/util.rb'
270
+
271
+ # Offense count: 8
272
+ # Cop supports --auto-correct.
273
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
274
+ # SupportedStyles: space, no_space, compact
275
+ # SupportedStylesForEmptyBrackets: space, no_space
276
+ Layout/SpaceInsideArrayLiteralBrackets:
277
+ Exclude:
278
+ - 'lib/instana/tracing/span.rb'
279
+
280
+ # Offense count: 3
281
+ # Cop supports --auto-correct.
282
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
283
+ # SupportedStyles: space, no_space
284
+ # SupportedStylesForEmptyBraces: space, no_space
285
+ Layout/SpaceInsideBlockBraces:
286
+ Exclude:
287
+ - 'benchmarks/Gemfile'
288
+ - 'lib/instana/tracing/processor.rb'
289
+ - 'test/secrets_test.rb'
290
+
291
+ # Offense count: 180
292
+ # Cop supports --auto-correct.
293
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
294
+ # SupportedStyles: space, no_space, compact
295
+ # SupportedStylesForEmptyBraces: space, no_space
296
+ Layout/SpaceInsideHashLiteralBraces:
297
+ Enabled: false
298
+
299
+ # Offense count: 1
300
+ # Cop supports --auto-correct.
301
+ # Configuration parameters: EnforcedStyle.
302
+ # SupportedStyles: space, no_space
303
+ Layout/SpaceInsideParens:
304
+ Exclude:
305
+ - 'test/instrumentation/grpc_test.rb'
306
+
307
+ # Offense count: 3
308
+ # Cop supports --auto-correct.
309
+ # Configuration parameters: EnforcedStyle.
310
+ # SupportedStyles: final_newline, final_blank_line
311
+ Layout/TrailingEmptyLines:
312
+ Exclude:
313
+ - 'benchmarks/10k-rack-traces.rb'
314
+ - 'benchmarks/Gemfile'
315
+ - 'lib/instana/instrumentation/excon.rb'
316
+
317
+ # Offense count: 85
318
+ # Cop supports --auto-correct.
319
+ # Configuration parameters: AllowInHeredoc.
320
+ Layout/TrailingWhitespace:
321
+ Exclude:
322
+ - 'Appraisals'
323
+ - 'Rakefile'
324
+ - 'lib/instana/agent.rb'
325
+ - 'lib/instana/frameworks/cuba.rb'
326
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
327
+ - 'lib/instana/frameworks/roda.rb'
328
+ - 'lib/instana/frameworks/sinatra.rb'
329
+ - 'lib/instana/instrumentation/graphql.rb'
330
+ - 'lib/instana/tracer.rb'
331
+ - 'test/frameworks/rails/actioncontroller_test.rb'
332
+ - 'test/instrumentation/graphql_test.rb'
333
+ - 'test/secrets_test.rb'
334
+ - 'test/support/apps/cuba/config.ru'
335
+ - 'test/support/apps/sinatra/config.ru'
336
+
337
+ # Offense count: 14
338
+ Lint/AmbiguousBlockAssociation:
339
+ Exclude:
340
+ - 'benchmarks/10k-rack-traces.rb'
341
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
342
+ - 'benchmarks/stackprof_rack_tracing.rb'
343
+ - 'test/support/apps/http_endpoint/boot.rb'
344
+
345
+ # Offense count: 1
346
+ # Configuration parameters: AllowSafeAssignment.
347
+ Lint/AssignmentInCondition:
348
+ Exclude:
349
+ - 'test/frameworks/rails/activerecord_test.rb'
350
+
351
+ # Offense count: 1
352
+ # Configuration parameters: DebuggerReceivers, DebuggerMethods.
353
+ # DebuggerReceivers: binding, Kernel, Pry
354
+ # DebuggerMethods: debugger, byebug, remote_byebug, pry, remote_pry, pry_remote, console, rescue, save_and_open_page, save_and_open_screenshot, irb
355
+ Lint/Debugger:
356
+ Exclude:
357
+ - 'lib/instana/util.rb'
358
+
359
+ # Offense count: 2
360
+ Lint/DuplicateElsifCondition:
361
+ Exclude:
362
+ - 'test/support/apps/resque/jobs/resque_error_job.rb'
363
+ - 'test/support/apps/resque/jobs/resque_fast_job.rb'
364
+
365
+ # Offense count: 1
366
+ Lint/DuplicateMethods:
367
+ Exclude:
368
+ - 'lib/instana/tracing/span.rb'
369
+
370
+ # Offense count: 1
371
+ Lint/DuplicateRequire:
372
+ Exclude:
373
+ - 'test/support/apps/rails/boot.rb'
374
+
375
+ # Offense count: 1
376
+ # Cop supports --auto-correct.
377
+ Lint/EnsureReturn:
378
+ Exclude:
379
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
380
+
381
+ # Offense count: 1
382
+ # Cop supports --auto-correct.
383
+ Lint/NonDeterministicRequireOrder:
384
+ Exclude:
385
+ - 'lib/instana/instrumentation.rb'
386
+
387
+ # Offense count: 5
388
+ # Cop supports --auto-correct.
389
+ # Configuration parameters: AllowedImplicitNamespaces.
390
+ # AllowedImplicitNamespaces: Gem
391
+ Lint/RaiseException:
392
+ Exclude:
393
+ - 'test/support/apps/rails/boot.rb'
394
+ - 'test/support/apps/resque/jobs/resque_error_job.rb'
395
+ - 'test/tracing/tracer_test.rb'
396
+
397
+ # Offense count: 2
398
+ # Cop supports --auto-correct.
399
+ Lint/RedundantRequireStatement:
400
+ Exclude:
401
+ - 'lib/instana/agent.rb'
402
+ - 'lib/instana/tracing/processor.rb'
403
+
404
+ # Offense count: 18
405
+ Lint/RescueException:
406
+ Exclude:
407
+ - 'lib/instana/agent.rb'
408
+ - 'lib/instana/agent/helpers.rb'
409
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
410
+ - 'lib/instana/frameworks/instrumentation/action_view.rb'
411
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
412
+ - 'lib/instana/instrumentation/graphql.rb'
413
+ - 'lib/instana/instrumentation/rack.rb'
414
+ - 'lib/instana/instrumentation/resque.rb'
415
+ - 'lib/instana/tracer.rb'
416
+ - 'lib/instana/util.rb'
417
+ - 'test/instrumentation/net_http_test.rb'
418
+ - 'test/tracing/tracer_test.rb'
419
+
420
+ # Offense count: 11
421
+ # Cop supports --auto-correct.
422
+ Lint/SendWithMixinArgument:
423
+ Exclude:
424
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
425
+ - 'lib/instana/frameworks/instrumentation/action_view.rb'
426
+ - 'lib/instana/frameworks/instrumentation/active_record.rb'
427
+ - 'lib/instana/instrumentation/dalli.rb'
428
+ - 'lib/instana/instrumentation/rest-client.rb'
429
+
430
+ # Offense count: 9
431
+ # Configuration parameters: AllowComments.
432
+ Lint/SuppressedException:
433
+ Exclude:
434
+ - 'test/instrumentation/dalli_test.rb'
435
+ - 'test/instrumentation/excon_test.rb'
436
+ - 'test/instrumentation/grpc_test.rb'
437
+ - 'test/instrumentation/redis_test.rb'
438
+ - 'test/instrumentation/sidekiq-client_test.rb'
439
+
440
+ # Offense count: 2
441
+ Lint/UnreachableCode:
442
+ Exclude:
443
+ - 'test/support/apps/resque/jobs/resque_error_job.rb'
444
+ - 'test/tracing/custom_test.rb'
445
+
446
+ # Offense count: 7
447
+ # Cop supports --auto-correct.
448
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
449
+ Lint/UnusedBlockArgument:
450
+ Exclude:
451
+ - 'lib/instana/frameworks/cuba.rb'
452
+ - 'lib/instana/instrumentation/resque.rb'
453
+ - 'test/benchmarks/bench_id_generation.rb'
454
+ - 'test/benchmarks/bench_opentracing.rb'
455
+ - 'test/support/apps/http_endpoint/boot.rb'
456
+
457
+ # Offense count: 23
458
+ # Cop supports --auto-correct.
459
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
460
+ Lint/UnusedMethodArgument:
461
+ Exclude:
462
+ - 'lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb'
463
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
464
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
465
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
466
+ - 'lib/instana/instrumentation/graphql.rb'
467
+ - 'lib/instana/instrumentation/resque.rb'
468
+ - 'lib/instana/tracer.rb'
469
+ - 'test/support/apps/grpc/grpc_server.rb'
470
+ - 'test/support/apps/rails/models/block.rb'
471
+ - 'test/support/apps/rails/models/block6.rb'
472
+ - 'test/support/apps/sidekiq/jobs/sidekiq_job_2.rb'
473
+
474
+ # Offense count: 1
475
+ Lint/UriEscapeUnescape:
476
+ Exclude:
477
+ - 'lib/instana/agent/tasks.rb'
478
+
479
+ # Offense count: 33
480
+ Lint/UselessAssignment:
481
+ Exclude:
482
+ - 'lib/instana/agent.rb'
483
+ - 'lib/instana/instrumentation/grpc.rb'
484
+ - 'lib/instana/tracing/span.rb'
485
+ - 'lib/oj_check.rb'
486
+ - 'test/frameworks/cuba_test.rb'
487
+ - 'test/frameworks/rails/actionview4_test.rb'
488
+ - 'test/frameworks/rails/actionview5_test.rb'
489
+ - 'test/frameworks/rails/activerecord_test.rb'
490
+ - 'test/frameworks/roda_test.rb'
491
+ - 'test/frameworks/sinatra_test.rb'
492
+ - 'test/instrumentation/net_http_test.rb'
493
+ - 'test/tracing/opentracing_test.rb'
494
+
495
+ # Offense count: 1
496
+ # Cop supports --auto-correct.
497
+ Lint/UselessTimes:
498
+ Exclude:
499
+ - 'benchmarks/10k-rack-traces.rb'
500
+
501
+ # Offense count: 169
502
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
503
+ Metrics/AbcSize:
504
+ Max: 126
505
+
506
+ # Offense count: 4
507
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
508
+ # IgnoredMethods: refine
509
+ Metrics/BlockLength:
510
+ Max: 28
511
+
512
+ # Offense count: 1
513
+ # Configuration parameters: CountBlocks.
514
+ Metrics/BlockNesting:
515
+ Max: 4
516
+
517
+ # Offense count: 19
518
+ # Configuration parameters: CountComments, CountAsOne.
519
+ Metrics/ClassLength:
520
+ Max: 298
521
+
522
+ # Offense count: 15
523
+ # Configuration parameters: IgnoredMethods.
524
+ Metrics/CyclomaticComplexity:
525
+ Max: 16
526
+
527
+ # Offense count: 170
528
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
529
+ Metrics/MethodLength:
530
+ Max: 51
531
+
532
+ # Offense count: 1
533
+ # Configuration parameters: CountComments, CountAsOne.
534
+ Metrics/ModuleLength:
535
+ Max: 128
536
+
537
+ # Offense count: 16
538
+ # Configuration parameters: IgnoredMethods.
539
+ Metrics/PerceivedComplexity:
540
+ Max: 16
541
+
542
+ # Offense count: 4
543
+ Naming/AccessorMethodName:
544
+ Exclude:
545
+ - 'lib/instana/agent/helpers.rb'
546
+ - 'lib/instana/tracing/span.rb'
547
+ - 'lib/instana/util.rb'
548
+
549
+ # Offense count: 7
550
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
551
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
552
+ Naming/FileName:
553
+ Exclude:
554
+ - 'benchmarks/10k-rack-traces.rb'
555
+ - 'lib/instana/instrumentation/net-http.rb'
556
+ - 'lib/instana/instrumentation/rest-client.rb'
557
+ - 'lib/instana/instrumentation/sidekiq-client.rb'
558
+ - 'lib/instana/instrumentation/sidekiq-worker.rb'
559
+ - 'test/instrumentation/sidekiq-client_test.rb'
560
+ - 'test/instrumentation/sidekiq-worker_test.rb'
561
+
562
+ # Offense count: 14
563
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
564
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
565
+ Naming/MethodParameterName:
566
+ Exclude:
567
+ - 'lib/instana/instrumentation/dalli.rb'
568
+ - 'lib/instana/instrumentation/resque.rb'
569
+ - 'lib/instana/tracer.rb'
570
+ - 'lib/instana/tracing/span.rb'
571
+ - 'test/support/apps/sidekiq/jobs/sidekiq_job_1.rb'
572
+ - 'test/support/apps/sidekiq/jobs/sidekiq_job_2.rb'
573
+ - 'test/support/helpers.rb'
574
+
575
+ # Offense count: 4
576
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
577
+ # NamePrefix: is_, has_, have_
578
+ # ForbiddenPrefixes: is_, has_, have_
579
+ # AllowedMethods: is_a?
580
+ # MethodDefinitionMacros: define_method, define_singleton_method
581
+ Naming/PredicateName:
582
+ Exclude:
583
+ - 'spec/**/*'
584
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
585
+ - 'test/support/helpers.rb'
586
+
587
+ # Offense count: 2
588
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
589
+ # SupportedStyles: snake_case, normalcase, non_integer
590
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
591
+ Naming/VariableNumber:
592
+ Exclude:
593
+ - 'test/frameworks/rails/actioncontroller_test.rb'
594
+
595
+ # Offense count: 23
596
+ # Cop supports --auto-correct.
597
+ # Configuration parameters: EnforcedStyle.
598
+ # SupportedStyles: separated, grouped
599
+ Style/AccessorGrouping:
600
+ Exclude:
601
+ - 'lib/instana/agent.rb'
602
+ - 'lib/instana/base.rb'
603
+ - 'lib/instana/collector.rb'
604
+ - 'lib/instana/tracing/span.rb'
605
+ - 'lib/instana/tracing/span_context.rb'
606
+
607
+ # Offense count: 1
608
+ # Cop supports --auto-correct.
609
+ # Configuration parameters: EnforcedStyle.
610
+ # SupportedStyles: always, conditionals
611
+ Style/AndOr:
612
+ Exclude:
613
+ - 'lib/instana/agent/helpers.rb'
614
+
615
+ # Offense count: 20
616
+ # Cop supports --auto-correct.
617
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
618
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
619
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
620
+ # FunctionalMethods: let, let!, subject, watch
621
+ # IgnoredMethods: lambda, proc, it
622
+ Style/BlockDelimiters:
623
+ Exclude:
624
+ - 'benchmarks/10k-rack-traces.rb'
625
+ - 'benchmarks/opentracing.rb'
626
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
627
+ - 'benchmarks/stackprof_rack_tracing.rb'
628
+ - 'lib/instana/agent.rb'
629
+ - 'test/support/apps/http_endpoint/boot.rb'
630
+ - 'test/tracing/opentracing_test.rb'
631
+
632
+ # Offense count: 1
633
+ # Cop supports --auto-correct.
634
+ # Configuration parameters: AllowOnConstant.
635
+ Style/CaseEquality:
636
+ Exclude:
637
+ - 'lib/instana/instrumentation.rb'
638
+
639
+ # Offense count: 4
640
+ # Cop supports --auto-correct.
641
+ Style/CaseLikeIf:
642
+ Exclude:
643
+ - 'lib/instana/agent.rb'
644
+ - 'lib/instana/agent/tasks.rb'
645
+ - 'lib/instana/tracing/span.rb'
646
+ - 'lib/instana/util.rb'
647
+
648
+ # Offense count: 4
649
+ Style/ClassVars:
650
+ Exclude:
651
+ - 'lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb'
652
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
653
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
654
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
655
+
656
+ # Offense count: 1
657
+ # Cop supports --auto-correct.
658
+ # Configuration parameters: Keywords.
659
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
660
+ Style/CommentAnnotation:
661
+ Exclude:
662
+ - 'lib/instana/instrumentation/instrumented_request.rb'
663
+
664
+ # Offense count: 27
665
+ # Cop supports --auto-correct.
666
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
667
+ # SupportedStyles: assign_to_condition, assign_inside_condition
668
+ Style/ConditionalAssignment:
669
+ Exclude:
670
+ - 'lib/instana/agent.rb'
671
+ - 'lib/instana/agent/tasks.rb'
672
+ - 'lib/instana/base.rb'
673
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
674
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
675
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
676
+ - 'lib/instana/instrumentation/net-http.rb'
677
+ - 'lib/instana/tracer.rb'
678
+ - 'lib/instana/tracing/span.rb'
679
+ - 'lib/instana/util.rb'
680
+ - 'test/frameworks/rails/activerecord_test.rb'
681
+ - 'test/instrumentation/redis_test.rb'
682
+ - 'test/support/apps/resque/jobs/resque_error_job.rb'
683
+ - 'test/support/apps/resque/jobs/resque_fast_job.rb'
684
+
685
+ # Offense count: 1
686
+ # Cop supports --auto-correct.
687
+ Style/DefWithParentheses:
688
+ Exclude:
689
+ - 'test/instrumentation/graphql_test.rb'
690
+
691
+ # Offense count: 45
692
+ Style/Documentation:
693
+ Enabled: false
694
+
695
+ # Offense count: 2
696
+ # Cop supports --auto-correct.
697
+ # Configuration parameters: EnforcedStyle.
698
+ # SupportedStyles: compact, expanded
699
+ Style/EmptyMethod:
700
+ Exclude:
701
+ - 'test/instrumentation/resque_test.rb'
702
+ - 'test/support/apps/sidekiq/jobs/sidekiq_job_1.rb'
703
+
704
+ # Offense count: 1
705
+ # Cop supports --auto-correct.
706
+ Style/Encoding:
707
+ Exclude:
708
+ - 'instana.gemspec'
709
+
710
+ # Offense count: 1
711
+ # Cop supports --auto-correct.
712
+ Style/ExpandPathArguments:
713
+ Exclude:
714
+ - 'instana.gemspec'
715
+
716
+ # Offense count: 1
717
+ # Cop supports --auto-correct.
718
+ # Configuration parameters: EnforcedStyle.
719
+ # SupportedStyles: each, for
720
+ Style/For:
721
+ Exclude:
722
+ - 'test/instrumentation/excon_test.rb'
723
+
724
+ # Offense count: 3
725
+ # Cop supports --auto-correct.
726
+ # Configuration parameters: EnforcedStyle.
727
+ # SupportedStyles: format, sprintf, percent
728
+ Style/FormatString:
729
+ Exclude:
730
+ - 'lib/instana/agent.rb'
731
+
732
+ # Offense count: 134
733
+ # Cop supports --auto-correct.
734
+ # Configuration parameters: EnforcedStyle.
735
+ # SupportedStyles: always, always_true, never
736
+ Style/FrozenStringLiteralComment:
737
+ Enabled: false
738
+
739
+ # Offense count: 2
740
+ # Cop supports --auto-correct.
741
+ Style/GlobalStdStream:
742
+ Exclude:
743
+ - 'benchmarks/10k-rack-traces.rb'
744
+ - 'lib/instana/base.rb'
745
+
746
+ # Offense count: 12
747
+ # Configuration parameters: AllowedVariables.
748
+ Style/GlobalVars:
749
+ Exclude:
750
+ - 'test/instrumentation/sidekiq-worker_test.rb'
751
+ - 'test/support/apps/sidekiq/boot.rb'
752
+
753
+ # Offense count: 9
754
+ # Configuration parameters: MinBodyLength.
755
+ Style/GuardClause:
756
+ Exclude:
757
+ - 'lib/instana/config.rb'
758
+ - 'lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb'
759
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
760
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
761
+ - 'lib/instana/util.rb'
762
+ - 'test/instrumentation/grpc_test.rb'
763
+ - 'test/instrumentation/redis_test.rb'
764
+
765
+ # Offense count: 248
766
+ # Cop supports --auto-correct.
767
+ # Configuration parameters: UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
768
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
769
+ Style/HashSyntax:
770
+ EnforcedStyle: hash_rockets
771
+
772
+ # Offense count: 1
773
+ # Cop supports --auto-correct.
774
+ Style/HashTransformValues:
775
+ Exclude:
776
+ - 'lib/instana/instrumentation/graphql.rb'
777
+
778
+ # Offense count: 5
779
+ # Cop supports --auto-correct.
780
+ # Configuration parameters: AllowIfModifier.
781
+ Style/IfInsideElse:
782
+ Exclude:
783
+ - 'lib/instana/collector.rb'
784
+ - 'lib/instana/instrumentation/net-http.rb'
785
+ - 'lib/instana/tracing/span.rb'
786
+ - 'lib/instana/util.rb'
787
+
788
+ # Offense count: 44
789
+ # Cop supports --auto-correct.
790
+ Style/IfUnlessModifier:
791
+ Enabled: false
792
+
793
+ # Offense count: 1
794
+ # Cop supports --auto-correct.
795
+ Style/InfiniteLoop:
796
+ Exclude:
797
+ - 'lib/instana/agent.rb'
798
+
799
+ # Offense count: 1
800
+ # Cop supports --auto-correct.
801
+ # Configuration parameters: EnforcedStyle.
802
+ # SupportedStyles: line_count_dependent, lambda, literal
803
+ Style/Lambda:
804
+ Exclude:
805
+ - 'lib/instana/secrets.rb'
806
+
807
+ # Offense count: 2
808
+ # Cop supports --auto-correct.
809
+ # Configuration parameters: EnforcedStyle.
810
+ # SupportedStyles: call, braces
811
+ Style/LambdaCall:
812
+ Exclude:
813
+ - 'lib/instana/frameworks/roda.rb'
814
+ - 'lib/instana/secrets.rb'
815
+
816
+ # Offense count: 4
817
+ # Cop supports --auto-correct.
818
+ # Configuration parameters: IgnoredMethods.
819
+ Style/MethodCallWithoutArgsParentheses:
820
+ Exclude:
821
+ - 'examples/opentracing.rb'
822
+
823
+ # Offense count: 2
824
+ Style/MissingRespondToMissing:
825
+ Exclude:
826
+ - 'lib/instana/opentracing/tracer.rb'
827
+ - 'lib/instana/tracer.rb'
828
+
829
+ # Offense count: 1
830
+ Style/MixinUsage:
831
+ Exclude:
832
+ - 'lib/instana/agent.rb'
833
+
834
+ # Offense count: 1
835
+ Style/MultilineBlockChain:
836
+ Exclude:
837
+ - 'test/support/helpers.rb'
838
+
839
+ # Offense count: 16
840
+ # Cop supports --auto-correct.
841
+ # Configuration parameters: EnforcedStyle.
842
+ # SupportedStyles: literals, strict
843
+ Style/MutableConstant:
844
+ Exclude:
845
+ - 'benchmarks/id_generation.rb'
846
+ - 'lib/instana/agent.rb'
847
+ - 'lib/instana/agent/tasks.rb'
848
+ - 'lib/instana/frameworks/cuba.rb'
849
+ - 'lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb'
850
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
851
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
852
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
853
+ - 'lib/instana/instrumentation/grpc.rb'
854
+ - 'lib/instana/util.rb'
855
+ - 'lib/instana/version.rb'
856
+
857
+ # Offense count: 6
858
+ # Cop supports --auto-correct.
859
+ # Configuration parameters: EnforcedStyle.
860
+ # SupportedStyles: both, prefix, postfix
861
+ Style/NegatedIf:
862
+ Exclude:
863
+ - 'lib/instana/agent.rb'
864
+ - 'lib/instana/helpers.rb'
865
+ - 'lib/instana/tracer.rb'
866
+ - 'lib/instana/tracing/span.rb'
867
+
868
+ # Offense count: 3
869
+ # Cop supports --auto-correct.
870
+ Style/NegatedWhile:
871
+ Exclude:
872
+ - 'benchmarks/10k-rack-traces.rb'
873
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
874
+ - 'lib/instana/tracing/processor.rb'
875
+
876
+ # Offense count: 1
877
+ # Cop supports --auto-correct.
878
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
879
+ # SupportedStyles: skip_modifier_ifs, always
880
+ Style/Next:
881
+ Exclude:
882
+ - 'lib/instana/tracing/span.rb'
883
+
884
+ # Offense count: 5
885
+ # Cop supports --auto-correct.
886
+ # Configuration parameters: Strict.
887
+ Style/NumericLiterals:
888
+ MinDigits: 6
889
+
890
+ # Offense count: 11
891
+ # Cop supports --auto-correct.
892
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
893
+ # SupportedStyles: predicate, comparison
894
+ Style/NumericPredicate:
895
+ Exclude:
896
+ - 'spec/**/*'
897
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
898
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
899
+ - 'lib/instana/secrets.rb'
900
+ - 'test/tracing/custom_test.rb'
901
+ - 'test/tracing/opentracing_test.rb'
902
+ - 'test/tracing/tracer_test.rb'
903
+
904
+ # Offense count: 2
905
+ # Configuration parameters: AllowedMethods.
906
+ # AllowedMethods: respond_to_missing?
907
+ Style/OptionalBooleanParameter:
908
+ Exclude:
909
+ - 'lib/instana/agent.rb'
910
+ - 'test/support/helpers.rb'
911
+
912
+ # Offense count: 3
913
+ # Cop supports --auto-correct.
914
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
915
+ Style/ParenthesesAroundCondition:
916
+ Exclude:
917
+ - 'lib/instana/util.rb'
918
+
919
+ # Offense count: 21
920
+ # Cop supports --auto-correct.
921
+ # Configuration parameters: PreferredDelimiters.
922
+ Style/PercentLiteralDelimiters:
923
+ Exclude:
924
+ - 'instana.gemspec'
925
+ - 'lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb'
926
+ - 'lib/instana/frameworks/instrumentation/mysql2_adapter.rb'
927
+ - 'lib/instana/frameworks/instrumentation/mysql_adapter.rb'
928
+ - 'lib/instana/frameworks/instrumentation/postgresql_adapter.rb'
929
+ - 'test/instrumentation/grpc_test.rb'
930
+ - 'test/instrumentation/rack_test.rb'
931
+ - 'test/secrets_test.rb'
932
+
933
+ # Offense count: 3
934
+ # Cop supports --auto-correct.
935
+ # Configuration parameters: EnforcedStyle.
936
+ # SupportedStyles: short, verbose
937
+ Style/PreferredHashMethods:
938
+ Exclude:
939
+ - 'lib/instana/instrumentation/instrumented_request.rb'
940
+
941
+ # Offense count: 14
942
+ # Cop supports --auto-correct.
943
+ Style/Proc:
944
+ Exclude:
945
+ - 'benchmarks/10k-rack-traces.rb'
946
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
947
+ - 'benchmarks/stackprof_rack_tracing.rb'
948
+ - 'test/support/apps/http_endpoint/boot.rb'
949
+
950
+ # Offense count: 7
951
+ # Cop supports --auto-correct.
952
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
953
+ # SupportedStyles: compact, exploded
954
+ Style/RaiseArgs:
955
+ Exclude:
956
+ - 'test/support/apps/rails/boot.rb'
957
+ - 'test/support/apps/resque/jobs/resque_error_job.rb'
958
+ - 'test/tracing/tracer_test.rb'
959
+
960
+ # Offense count: 9
961
+ # Cop supports --auto-correct.
962
+ Style/RedundantBegin:
963
+ Exclude:
964
+ - 'lib/instana/instrumentation.rb'
965
+ - 'lib/instana/instrumentation/grpc.rb'
966
+ - 'test/instrumentation/grpc_test.rb'
967
+ - 'test/instrumentation/redis_test.rb'
968
+
969
+ # Offense count: 2
970
+ # Cop supports --auto-correct.
971
+ Style/RedundantParentheses:
972
+ Exclude:
973
+ - 'lib/instana/helpers.rb'
974
+
975
+ # Offense count: 2
976
+ # Cop supports --auto-correct.
977
+ Style/RedundantPercentQ:
978
+ Exclude:
979
+ - 'instana.gemspec'
980
+
981
+ # Offense count: 13
982
+ # Cop supports --auto-correct.
983
+ # Configuration parameters: AllowMultipleReturnValues.
984
+ Style/RedundantReturn:
985
+ Exclude:
986
+ - 'lib/instana/agent.rb'
987
+ - 'lib/instana/agent/helpers.rb'
988
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
989
+ - 'lib/instana/helpers.rb'
990
+ - 'lib/instana/util.rb'
991
+
992
+ # Offense count: 43
993
+ # Cop supports --auto-correct.
994
+ Style/RedundantSelf:
995
+ Exclude:
996
+ - 'lib/instana/instrumentation/redis.rb'
997
+ - 'lib/instana/tracer.rb'
998
+
999
+ # Offense count: 2
1000
+ # Cop supports --auto-correct.
1001
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
1002
+ # SupportedStyles: slashes, percent_r, mixed
1003
+ Style/RegexpLiteral:
1004
+ Exclude:
1005
+ - 'lib/instana/frameworks/cuba.rb'
1006
+ - 'lib/instana/tracing/span.rb'
1007
+
1008
+ # Offense count: 6
1009
+ # Cop supports --auto-correct.
1010
+ Style/RescueModifier:
1011
+ Exclude:
1012
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
1013
+ - 'lib/instana/instrumentation/dalli.rb'
1014
+ - 'lib/instana/tracing/processor.rb'
1015
+
1016
+ # Offense count: 40
1017
+ # Cop supports --auto-correct.
1018
+ # Configuration parameters: EnforcedStyle.
1019
+ # SupportedStyles: implicit, explicit
1020
+ Style/RescueStandardError:
1021
+ Enabled: false
1022
+
1023
+ # Offense count: 1
1024
+ # Cop supports --auto-correct.
1025
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
1026
+ # AllowedMethods: present?, blank?, presence, try, try!
1027
+ Style/SafeNavigation:
1028
+ Exclude:
1029
+ - 'lib/instana/agent.rb'
1030
+
1031
+ # Offense count: 1
1032
+ # Cop supports --auto-correct.
1033
+ Style/SlicingWithRange:
1034
+ Exclude:
1035
+ - 'lib/instana/util.rb'
1036
+
1037
+ # Offense count: 5
1038
+ # Cop supports --auto-correct.
1039
+ # Configuration parameters: EnforcedStyle.
1040
+ # SupportedStyles: use_perl_names, use_english_names
1041
+ Style/SpecialGlobalVars:
1042
+ Exclude:
1043
+ - 'lib/instana/util.rb'
1044
+
1045
+ # Offense count: 4
1046
+ # Cop supports --auto-correct.
1047
+ Style/StringConcatenation:
1048
+ Exclude:
1049
+ - 'lib/instana/helpers.rb'
1050
+ - 'lib/instana/instrumentation/instrumented_request.rb'
1051
+ - 'lib/instana/thread_local.rb'
1052
+
1053
+ # Offense count: 939
1054
+ # Cop supports --auto-correct.
1055
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
1056
+ # SupportedStyles: single_quotes, double_quotes
1057
+ Style/StringLiterals:
1058
+ Enabled: false
1059
+
1060
+ # Offense count: 1
1061
+ # Cop supports --auto-correct.
1062
+ # Configuration parameters: EnforcedStyle.
1063
+ # SupportedStyles: single_quotes, double_quotes
1064
+ Style/StringLiteralsInInterpolation:
1065
+ Exclude:
1066
+ - 'lib/instana/agent/tasks.rb'
1067
+
1068
+ # Offense count: 10
1069
+ # Cop supports --auto-correct.
1070
+ # Configuration parameters: MinSize.
1071
+ # SupportedStyles: percent, brackets
1072
+ Style/SymbolArray:
1073
+ EnforcedStyle: brackets
1074
+
1075
+ # Offense count: 1
1076
+ # Cop supports --auto-correct.
1077
+ # Configuration parameters: IgnoredMethods.
1078
+ # IgnoredMethods: respond_to, define_method
1079
+ Style/SymbolProc:
1080
+ Exclude:
1081
+ - 'lib/instana/instrumentation/instrumented_request.rb'
1082
+
1083
+ # Offense count: 2
1084
+ # Cop supports --auto-correct.
1085
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
1086
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
1087
+ Style/TernaryParentheses:
1088
+ Exclude:
1089
+ - 'lib/instana/agent.rb'
1090
+
1091
+ # Offense count: 3
1092
+ # Cop supports --auto-correct.
1093
+ # Configuration parameters: EnforcedStyleForMultiline.
1094
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
1095
+ Style/TrailingCommaInHashLiteral:
1096
+ Exclude:
1097
+ - 'instana.gemspec'
1098
+ - 'lib/instana/instrumentation/graphql.rb'
1099
+
1100
+ # Offense count: 1
1101
+ # Cop supports --auto-correct.
1102
+ Style/UnpackFirst:
1103
+ Exclude:
1104
+ - 'lib/instana/util.rb'
1105
+
1106
+ # Offense count: 5
1107
+ # Cop supports --auto-correct.
1108
+ Style/WhileUntilDo:
1109
+ Exclude:
1110
+ - 'benchmarks/10k-rack-traces.rb'
1111
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
1112
+ - 'lib/instana/tracing/processor.rb'
1113
+
1114
+ # Offense count: 2
1115
+ # Cop supports --auto-correct.
1116
+ Style/WhileUntilModifier:
1117
+ Exclude:
1118
+ - 'benchmarks/10k-rack-traces.rb'
1119
+ - 'benchmarks/rack_vanilla_vs_traced.rb'
1120
+
1121
+ # Offense count: 2
1122
+ # Cop supports --auto-correct.
1123
+ # Configuration parameters: WordRegex.
1124
+ # SupportedStyles: percent, brackets
1125
+ Style/WordArray:
1126
+ EnforcedStyle: percent
1127
+ MinSize: 3
1128
+
1129
+ # Offense count: 2
1130
+ # Cop supports --auto-correct.
1131
+ Style/ZeroLengthPredicate:
1132
+ Exclude:
1133
+ - 'lib/instana/frameworks/instrumentation/action_controller.rb'
1134
+
1135
+ # Offense count: 36
1136
+ # Cop supports --auto-correct.
1137
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
1138
+ # URISchemes: http, https
1139
+ Layout/LineLength:
1140
+ Max: 185