appsignal 2.1.0.alpha.3 → 2.1.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +43 -0
- data/.rubocop_todo.yml +289 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +11 -1
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/appsignal.gemspec +1 -0
- data/bin/appsignal +2 -2
- data/ext/agent.yml +11 -11
- data/ext/extconf.rb +33 -33
- data/gemfiles/rails-4.2.gemfile +4 -0
- data/gemfiles/resque.gemfile +4 -0
- data/lib/appsignal.rb +58 -54
- data/lib/appsignal/auth_check.rb +15 -16
- data/lib/appsignal/capistrano.rb +4 -4
- data/lib/appsignal/cli.rb +28 -28
- data/lib/appsignal/cli/diagnose.rb +11 -11
- data/lib/appsignal/cli/helpers.rb +1 -1
- data/lib/appsignal/cli/install.rb +38 -38
- data/lib/appsignal/cli/notify_of_deploy.rb +1 -1
- data/lib/appsignal/config.rb +73 -71
- data/lib/appsignal/event_formatter.rb +8 -8
- data/lib/appsignal/event_formatter/action_view/render_formatter.rb +4 -4
- data/lib/appsignal/event_formatter/active_record/instantiation_formatter.rb +1 -1
- data/lib/appsignal/event_formatter/active_record/sql_formatter.rb +1 -1
- data/lib/appsignal/event_formatter/elastic_search/search_formatter.rb +9 -7
- data/lib/appsignal/event_formatter/faraday/request_formatter.rb +1 -1
- data/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb +6 -6
- data/lib/appsignal/event_formatter/moped/query_formatter.rb +56 -43
- data/lib/appsignal/extension.rb +5 -5
- data/lib/appsignal/hooks.rb +28 -26
- data/lib/appsignal/hooks/active_support_notifications.rb +2 -2
- data/lib/appsignal/hooks/celluloid.rb +1 -1
- data/lib/appsignal/hooks/data_mapper.rb +2 -2
- data/lib/appsignal/hooks/delayed_job.rb +1 -1
- data/lib/appsignal/hooks/mongo_ruby_driver.rb +1 -1
- data/lib/appsignal/hooks/net_http.rb +4 -4
- data/lib/appsignal/hooks/passenger.rb +2 -2
- data/lib/appsignal/hooks/puma.rb +4 -4
- data/lib/appsignal/hooks/rake.rb +1 -1
- data/lib/appsignal/hooks/redis.rb +1 -1
- data/lib/appsignal/hooks/sequel.rb +2 -2
- data/lib/appsignal/hooks/shoryuken.rb +8 -8
- data/lib/appsignal/hooks/sidekiq.rb +16 -15
- data/lib/appsignal/hooks/unicorn.rb +1 -1
- data/lib/appsignal/hooks/webmachine.rb +1 -1
- data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +6 -6
- data/lib/appsignal/integrations/data_mapper.rb +2 -3
- data/lib/appsignal/integrations/delayed_job_plugin.rb +5 -5
- data/lib/appsignal/integrations/mongo_ruby_driver.rb +6 -6
- data/lib/appsignal/integrations/padrino.rb +8 -8
- data/lib/appsignal/integrations/railtie.rb +5 -5
- data/lib/appsignal/integrations/resque.rb +4 -5
- data/lib/appsignal/integrations/resque_active_job.rb +3 -6
- data/lib/appsignal/integrations/sinatra.rb +2 -2
- data/lib/appsignal/integrations/webmachine.rb +2 -3
- data/lib/appsignal/js_exception_transaction.rb +10 -10
- data/lib/appsignal/marker.rb +3 -3
- data/lib/appsignal/rack/generic_instrumentation.rb +10 -9
- data/lib/appsignal/rack/js_exception_catcher.rb +7 -6
- data/lib/appsignal/rack/rails_instrumentation.rb +9 -8
- data/lib/appsignal/rack/sinatra_instrumentation.rb +19 -17
- data/lib/appsignal/rack/streaming_listener.rb +9 -8
- data/lib/appsignal/system.rb +19 -17
- data/lib/appsignal/transaction.rb +97 -40
- data/lib/appsignal/transmitter.rb +23 -30
- data/lib/appsignal/utils.rb +3 -3
- data/lib/appsignal/utils/params_sanitizer.rb +1 -1
- data/lib/appsignal/utils/query_params_sanitizer.rb +1 -1
- data/lib/appsignal/version.rb +2 -2
- data/spec/.rubocop.yml +4 -0
- data/spec/lib/appsignal/auth_check_spec.rb +7 -7
- data/spec/lib/appsignal/capistrano2_spec.rb +41 -41
- data/spec/lib/appsignal/capistrano3_spec.rb +43 -44
- data/spec/lib/appsignal/cli/notify_of_deploy_spec.rb +9 -11
- data/spec/lib/appsignal/cli_spec.rb +9 -9
- data/spec/lib/appsignal/config_spec.rb +88 -86
- data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +9 -9
- data/spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb +4 -4
- data/spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb +4 -4
- data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +12 -12
- data/spec/lib/appsignal/event_formatter/faraday/request_formatter_spec.rb +4 -4
- data/spec/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter_spec.rb +23 -23
- data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +29 -30
- data/spec/lib/appsignal/event_formatter_spec.rb +28 -28
- data/spec/lib/appsignal/extension_spec.rb +15 -15
- data/spec/lib/appsignal/garbage_collection_profiler_spec.rb +6 -5
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +12 -12
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +34 -34
- data/spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb +3 -3
- data/spec/lib/appsignal/hooks/net_http_spec.rb +10 -10
- data/spec/lib/appsignal/hooks/rake_spec.rb +7 -7
- data/spec/lib/appsignal/hooks/redis_spec.rb +6 -6
- data/spec/lib/appsignal/hooks/shoryuken_spec.rb +21 -22
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +48 -45
- data/spec/lib/appsignal/hooks/webmachine_spec.rb +2 -2
- data/spec/lib/appsignal/hooks_spec.rb +16 -17
- data/spec/lib/appsignal/integrations/data_mapper_spec.rb +7 -8
- data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +19 -19
- data/spec/lib/appsignal/integrations/object_spec.rb +3 -3
- data/spec/lib/appsignal/integrations/padrino_spec.rb +44 -44
- data/spec/lib/appsignal/integrations/railtie_spec.rb +13 -13
- data/spec/lib/appsignal/integrations/resque_active_job_spec.rb +7 -7
- data/spec/lib/appsignal/integrations/resque_spec.rb +8 -8
- data/spec/lib/appsignal/integrations/sinatra_spec.rb +7 -7
- data/spec/lib/appsignal/integrations/webmachine_spec.rb +15 -15
- data/spec/lib/appsignal/js_exception_transaction_spec.rb +23 -23
- data/spec/lib/appsignal/marker_spec.rb +8 -8
- data/spec/lib/appsignal/minutely_spec.rb +6 -6
- data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +7 -7
- data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +13 -13
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +11 -11
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +21 -21
- data/spec/lib/appsignal/rack/streaming_listener_spec.rb +36 -36
- data/spec/lib/appsignal/system/container_spec.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +213 -184
- data/spec/lib/appsignal/transmitter_spec.rb +20 -20
- data/spec/lib/appsignal/utils/params_sanitizer_spec.rb +19 -19
- data/spec/lib/appsignal/utils/query_params_sanitizer_spec.rb +41 -41
- data/spec/lib/appsignal/utils_spec.rb +41 -37
- data/spec/lib/appsignal_spec.rb +150 -142
- data/spec/spec_helper.rb +18 -18
- data/spec/support/delegate_matcher.rb +6 -6
- data/spec/support/helpers/api_request_helper.rb +2 -2
- data/spec/support/helpers/config_helpers.rb +3 -3
- data/spec/support/helpers/dependency_helper.rb +13 -13
- data/spec/support/helpers/directory_helper.rb +5 -5
- data/spec/support/helpers/env_helpers.rb +14 -14
- data/spec/support/helpers/system_helpers.rb +3 -3
- data/spec/support/helpers/transaction_helpers.rb +10 -10
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae60c35e104278641d1b44e7f90901f0839b3a24
|
4
|
+
data.tar.gz: e7c98edcf3b9c7e66b7d8fdc7d601d53b00512d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829e1eb8cdac7e35ad52067529d2d5ce50495cc0fa95ea5a6d80e6878dba3396a82c0ffa73d8b0c691b4ff472ccd57e3592e96c823786ec7ebd22666456313fd
|
7
|
+
data.tar.gz: 7887a42b3b30b818bc26337f50963d487e8af94be03315e908126bb8dda5bb850c62a48acfd1232bdf63dc2d86ae3a0cc9eabbeb0473634b5690878006d5a6e8
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 1.9
|
5
|
+
Include:
|
6
|
+
- "Gemfile"
|
7
|
+
Exclude:
|
8
|
+
- "tmp/**/*"
|
9
|
+
- "gemfiles/vendor/**/*"
|
10
|
+
- "vendor/**/*"
|
11
|
+
DisplayCopNames: true
|
12
|
+
UseCache: true
|
13
|
+
CacheRootDirectory: ./tmp
|
14
|
+
|
15
|
+
Style/Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Style/StringLiterals:
|
19
|
+
EnforcedStyle: double_quotes
|
20
|
+
|
21
|
+
Style/StringLiteralsInInterpolation:
|
22
|
+
EnforcedStyle: double_quotes
|
23
|
+
|
24
|
+
Style/AlignParameters:
|
25
|
+
EnforcedStyle: with_fixed_indentation
|
26
|
+
|
27
|
+
Style/MultilineMethodCallIndentation:
|
28
|
+
EnforcedStyle: indented
|
29
|
+
|
30
|
+
Style/MultilineOperationIndentation:
|
31
|
+
EnforcedStyle: indented
|
32
|
+
|
33
|
+
Style/HashSyntax:
|
34
|
+
EnforcedStyle: hash_rockets
|
35
|
+
|
36
|
+
Style/AlignHash:
|
37
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
38
|
+
|
39
|
+
Style/IndentArray:
|
40
|
+
EnforcedStyle: consistent
|
41
|
+
|
42
|
+
# Metrics/LineLength:
|
43
|
+
# Max: 80
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,289 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2016-12-27 13:45:00 +0100 using RuboCop version 0.46.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: 6
|
10
|
+
# Configuration parameters: AllowSafeAssignment.
|
11
|
+
Lint/AssignmentInCondition:
|
12
|
+
Exclude:
|
13
|
+
- 'lib/appsignal/config.rb'
|
14
|
+
- 'lib/appsignal/transaction.rb'
|
15
|
+
|
16
|
+
# Offense count: 7
|
17
|
+
Lint/HandleExceptions:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/appsignal/cli/install.rb'
|
20
|
+
- 'spec/lib/appsignal/hooks/shoryuken_spec.rb'
|
21
|
+
- 'spec/lib/appsignal/hooks/sidekiq_spec.rb'
|
22
|
+
- 'spec/lib/appsignal/integrations/resque_spec.rb'
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
Lint/IneffectiveAccessModifier:
|
26
|
+
Exclude:
|
27
|
+
- 'lib/appsignal/garbage_collection_profiler.rb'
|
28
|
+
|
29
|
+
# Offense count: 4
|
30
|
+
Lint/RescueException:
|
31
|
+
Exclude:
|
32
|
+
- 'lib/appsignal/minutely.rb'
|
33
|
+
- 'lib/appsignal/rack/streaming_listener.rb'
|
34
|
+
|
35
|
+
# Offense count: 3
|
36
|
+
# Cop supports --auto-correct.
|
37
|
+
Lint/UnifiedInteger:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/appsignal/utils.rb'
|
40
|
+
- 'lib/appsignal/utils/params_sanitizer.rb'
|
41
|
+
|
42
|
+
# Offense count: 36
|
43
|
+
Metrics/AbcSize:
|
44
|
+
Max: 59
|
45
|
+
|
46
|
+
# Offense count: 2
|
47
|
+
# Configuration parameters: CountComments.
|
48
|
+
Metrics/BlockLength:
|
49
|
+
Max: 31
|
50
|
+
|
51
|
+
# Offense count: 4
|
52
|
+
# Configuration parameters: CountComments.
|
53
|
+
Metrics/ClassLength:
|
54
|
+
Max: 263
|
55
|
+
|
56
|
+
# Offense count: 14
|
57
|
+
Metrics/CyclomaticComplexity:
|
58
|
+
Max: 11
|
59
|
+
|
60
|
+
# Offense count: 378
|
61
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
62
|
+
# URISchemes: http, https
|
63
|
+
Metrics/LineLength:
|
64
|
+
Max: 456
|
65
|
+
|
66
|
+
# Offense count: 77
|
67
|
+
# Configuration parameters: CountComments.
|
68
|
+
Metrics/MethodLength:
|
69
|
+
Max: 60
|
70
|
+
|
71
|
+
# Offense count: 1
|
72
|
+
# Configuration parameters: CountComments.
|
73
|
+
Metrics/ModuleLength:
|
74
|
+
Exclude:
|
75
|
+
- "lib/appsignal.rb"
|
76
|
+
|
77
|
+
# Offense count: 8
|
78
|
+
Metrics/PerceivedComplexity:
|
79
|
+
Max: 15
|
80
|
+
|
81
|
+
# Offense count: 7
|
82
|
+
Style/AccessorMethodName:
|
83
|
+
Exclude:
|
84
|
+
- 'lib/appsignal.rb'
|
85
|
+
- 'lib/appsignal/transaction.rb'
|
86
|
+
- 'spec/support/helpers/cli_helpers.rb'
|
87
|
+
|
88
|
+
# Offense count: 19
|
89
|
+
# Cop supports --auto-correct.
|
90
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
91
|
+
# SupportedStyles: prefer_alias, prefer_alias_method
|
92
|
+
Style/Alias:
|
93
|
+
Exclude:
|
94
|
+
- 'lib/appsignal.rb'
|
95
|
+
- 'lib/appsignal/hooks/active_support_notifications.rb'
|
96
|
+
- 'lib/appsignal/hooks/celluloid.rb'
|
97
|
+
- 'lib/appsignal/hooks/net_http.rb'
|
98
|
+
- 'lib/appsignal/hooks/puma.rb'
|
99
|
+
- 'lib/appsignal/hooks/rake.rb'
|
100
|
+
- 'lib/appsignal/hooks/redis.rb'
|
101
|
+
- 'lib/appsignal/hooks/unicorn.rb'
|
102
|
+
- 'lib/appsignal/hooks/webmachine.rb'
|
103
|
+
- 'lib/appsignal/transaction.rb'
|
104
|
+
|
105
|
+
# Offense count: 1
|
106
|
+
# Cop supports --auto-correct.
|
107
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
108
|
+
# SupportedStyles: always, conditionals
|
109
|
+
Style/AndOr:
|
110
|
+
Exclude:
|
111
|
+
- 'lib/appsignal.rb'
|
112
|
+
|
113
|
+
# Offense count: 3
|
114
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
115
|
+
# SupportedStyles: nested, compact
|
116
|
+
Style/ClassAndModuleChildren:
|
117
|
+
Exclude:
|
118
|
+
- 'lib/appsignal/integrations/padrino.rb'
|
119
|
+
- 'lib/appsignal/integrations/webmachine.rb'
|
120
|
+
|
121
|
+
# Offense count: 3
|
122
|
+
Style/ClassVars:
|
123
|
+
Exclude:
|
124
|
+
- 'lib/appsignal/event_formatter.rb'
|
125
|
+
- 'lib/appsignal/minutely.rb'
|
126
|
+
|
127
|
+
# Offense count: 1
|
128
|
+
Style/DoubleNegation:
|
129
|
+
Exclude:
|
130
|
+
- 'lib/appsignal.rb'
|
131
|
+
|
132
|
+
# Offense count: 9
|
133
|
+
# Cop supports --auto-correct.
|
134
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
135
|
+
# SupportedStyles: compact, expanded
|
136
|
+
Style/EmptyMethod:
|
137
|
+
Exclude:
|
138
|
+
- 'lib/appsignal/transaction.rb'
|
139
|
+
- 'spec/lib/appsignal/event_formatter_spec.rb'
|
140
|
+
- 'spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb'
|
141
|
+
- 'spec/lib/appsignal/hooks/puma_spec.rb'
|
142
|
+
- 'spec/lib/appsignal/hooks/unicorn_spec.rb'
|
143
|
+
- 'spec/lib/appsignal/integrations/data_mapper_spec.rb'
|
144
|
+
- 'spec/lib/appsignal/integrations/resque_active_job_spec.rb'
|
145
|
+
|
146
|
+
# Offense count: 5
|
147
|
+
# Configuration parameters: MinBodyLength.
|
148
|
+
Style/GuardClause:
|
149
|
+
Exclude:
|
150
|
+
- 'lib/appsignal.rb'
|
151
|
+
- 'lib/appsignal/event_formatter.rb'
|
152
|
+
- 'lib/appsignal/event_formatter/moped/query_formatter.rb'
|
153
|
+
- 'lib/appsignal/hooks.rb'
|
154
|
+
- 'lib/appsignal/marker.rb'
|
155
|
+
|
156
|
+
# Offense count: 3
|
157
|
+
# Cop supports --auto-correct.
|
158
|
+
# Configuration parameters: MaxLineLength.
|
159
|
+
Style/IfUnlessModifier:
|
160
|
+
Exclude:
|
161
|
+
- 'lib/appsignal.rb'
|
162
|
+
- 'lib/appsignal/garbage_collection_profiler.rb'
|
163
|
+
|
164
|
+
# Offense count: 2
|
165
|
+
Style/MethodMissing:
|
166
|
+
Exclude:
|
167
|
+
- 'lib/appsignal/extension.rb'
|
168
|
+
- 'lib/appsignal/transaction.rb'
|
169
|
+
|
170
|
+
# Offense count: 1
|
171
|
+
# Cop supports --auto-correct.
|
172
|
+
Style/MultilineIfModifier:
|
173
|
+
Exclude:
|
174
|
+
- 'lib/appsignal/js_exception_transaction.rb'
|
175
|
+
|
176
|
+
# Offense count: 9
|
177
|
+
# Cop supports --auto-correct.
|
178
|
+
Style/MutableConstant:
|
179
|
+
Exclude:
|
180
|
+
- 'ext/extconf.rb'
|
181
|
+
- 'lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb'
|
182
|
+
- 'lib/appsignal/integrations/data_mapper.rb'
|
183
|
+
- 'lib/appsignal/marker.rb'
|
184
|
+
- 'lib/appsignal/transaction.rb'
|
185
|
+
- 'lib/appsignal/transmitter.rb'
|
186
|
+
- 'lib/appsignal/version.rb'
|
187
|
+
- 'spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb'
|
188
|
+
- 'spec/lib/appsignal/hooks/redis_spec.rb'
|
189
|
+
|
190
|
+
# Offense count: 1
|
191
|
+
# Cop supports --auto-correct.
|
192
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
193
|
+
# SupportedStyles: skip_modifier_ifs, always
|
194
|
+
Style/Next:
|
195
|
+
Exclude:
|
196
|
+
- 'ext/extconf.rb'
|
197
|
+
|
198
|
+
# Offense count: 1
|
199
|
+
# Cop supports --auto-correct.
|
200
|
+
# Configuration parameters: IncludeSemanticChanges.
|
201
|
+
Style/NonNilCheck:
|
202
|
+
Exclude:
|
203
|
+
- 'lib/appsignal/transaction.rb'
|
204
|
+
|
205
|
+
# Offense count: 20
|
206
|
+
# Cop supports --auto-correct.
|
207
|
+
# Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles.
|
208
|
+
# SupportedOctalStyles: zero_with_o, zero_only
|
209
|
+
Style/NumericLiteralPrefix:
|
210
|
+
Exclude:
|
211
|
+
- 'ext/extconf.rb'
|
212
|
+
- 'spec/lib/appsignal/cli/diagnose_spec.rb'
|
213
|
+
- 'spec/lib/appsignal/config_spec.rb'
|
214
|
+
- 'spec/lib/appsignal/system/container_spec.rb'
|
215
|
+
- 'spec/lib/appsignal/transmitter_spec.rb'
|
216
|
+
- 'spec/lib/appsignal_spec.rb'
|
217
|
+
- 'spec/support/helpers/time_helpers.rb'
|
218
|
+
|
219
|
+
# Offense count: 1
|
220
|
+
# Cop supports --auto-correct.
|
221
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
|
222
|
+
# SupportedStyles: predicate, comparison
|
223
|
+
Style/NumericPredicate:
|
224
|
+
Exclude:
|
225
|
+
- 'spec/**/*'
|
226
|
+
- 'lib/appsignal/cli/diagnose.rb'
|
227
|
+
|
228
|
+
# Offense count: 2
|
229
|
+
# Cop supports --auto-correct.
|
230
|
+
Style/PerlBackrefs:
|
231
|
+
Exclude:
|
232
|
+
- 'lib/appsignal/system.rb'
|
233
|
+
|
234
|
+
# Offense count: 2
|
235
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
236
|
+
# NamePrefix: is_, has_, have_
|
237
|
+
# NamePrefixBlacklist: is_, has_, have_
|
238
|
+
# NameWhitelist: is_a?
|
239
|
+
Style/PredicateName:
|
240
|
+
Exclude:
|
241
|
+
- 'spec/**/*'
|
242
|
+
- 'lib/appsignal.rb'
|
243
|
+
|
244
|
+
# Offense count: 2
|
245
|
+
# Cop supports --auto-correct.
|
246
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
247
|
+
# SupportedStyles: compact, exploded
|
248
|
+
Style/RaiseArgs:
|
249
|
+
Exclude:
|
250
|
+
- 'lib/appsignal/utils.rb'
|
251
|
+
- 'spec/lib/appsignal/integrations/resque_spec.rb'
|
252
|
+
|
253
|
+
# Offense count: 7
|
254
|
+
# Cop supports --auto-correct.
|
255
|
+
Style/RescueModifier:
|
256
|
+
Exclude:
|
257
|
+
- 'spec/lib/appsignal/integrations/padrino_spec.rb'
|
258
|
+
- 'spec/lib/appsignal/rack/generic_instrumentation_spec.rb'
|
259
|
+
- 'spec/lib/appsignal/rack/rails_instrumentation_spec.rb'
|
260
|
+
- 'spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb'
|
261
|
+
- 'spec/lib/appsignal/rack/streaming_listener_spec.rb'
|
262
|
+
|
263
|
+
# Offense count: 2
|
264
|
+
# Cop supports --auto-correct.
|
265
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
266
|
+
# SupportedStyles: use_perl_names, use_english_names
|
267
|
+
Style/SpecialGlobalVars:
|
268
|
+
Exclude:
|
269
|
+
- 'lib/appsignal.rb'
|
270
|
+
- 'lib/appsignal/config.rb'
|
271
|
+
|
272
|
+
# Offense count: 1
|
273
|
+
# Cop supports --auto-correct.
|
274
|
+
Style/UnlessElse:
|
275
|
+
Exclude:
|
276
|
+
- 'lib/appsignal.rb'
|
277
|
+
|
278
|
+
# Offense count: 16
|
279
|
+
# Cop supports --auto-correct.
|
280
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, MinSize, WordRegex.
|
281
|
+
# SupportedStyles: percent, brackets
|
282
|
+
Style/WordArray:
|
283
|
+
Exclude:
|
284
|
+
- 'lib/appsignal/cli/install.rb'
|
285
|
+
- 'spec/lib/appsignal/config_spec.rb'
|
286
|
+
- 'spec/lib/appsignal/hooks/shoryuken_spec.rb'
|
287
|
+
- 'spec/lib/appsignal/hooks/sidekiq_spec.rb'
|
288
|
+
- 'spec/lib/appsignal/transaction_spec.rb'
|
289
|
+
- 'spec/lib/appsignal/utils/query_params_sanitizer_spec.rb'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# 2.1.0
|
2
|
-
* Add support for musl libc
|
2
|
+
* Add support for musl based libc (Alpine Linux). PR #229
|
3
|
+
* Implement `Appsignal.is_ignored_error?` and `Appsignal.is_ignored_action?`
|
4
|
+
logic in the AppSignal extension. PR #224
|
5
|
+
* Deprecate `Appsignal.is_ignored_error?`. PR #224
|
6
|
+
* Deprecate `Appsignal.is_ignored_action?`. PR #224
|
7
|
+
* Enforce a coding styleguide with RuboCop. PR #226
|
8
|
+
|
9
|
+
# 2.0.5
|
10
|
+
* Improved logging for agent connection issues.
|
11
|
+
Commit cdf9d3286d704e22473eb901c839cab4fab45a6f
|
12
|
+
* Handle nil request/environments in transactions. PR #231
|
3
13
|
|
4
14
|
# 2.0.4
|
5
15
|
* Use consistent log format for both file and STDOUT logs. PR #203
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/appsignal.gemspec
CHANGED
data/bin/appsignal
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__),
|
4
|
-
require
|
3
|
+
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
|
4
|
+
require "appsignal/cli"
|
5
5
|
|
6
6
|
begin
|
7
7
|
Appsignal::CLI.run
|
data/ext/agent.yml
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: 5f0c552
|
3
3
|
triples:
|
4
4
|
x86_64-linux:
|
5
|
-
checksum:
|
6
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
5
|
+
checksum: ded20da060a8c05c7551e9d86067ce7eecefca4ee3f8ddf286f79146d0895fd1
|
6
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-linux-all-static.tar.gz
|
7
7
|
i686-linux:
|
8
|
-
checksum:
|
9
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
8
|
+
checksum: 0332a1d256612b6230212ab5c503b53cf7e4121ff14c9df481d5a08545da89ba
|
9
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-i686-linux-all-static.tar.gz
|
10
10
|
x86-linux:
|
11
|
-
checksum:
|
12
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
11
|
+
checksum: 0332a1d256612b6230212ab5c503b53cf7e4121ff14c9df481d5a08545da89ba
|
12
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-i686-linux-all-static.tar.gz
|
13
13
|
x86_64-darwin:
|
14
|
-
checksum:
|
15
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
14
|
+
checksum: f4eaf9ef17f0c95adcc3b853f00134b28e1a50e33db48677dc3adfcbe48b14b4
|
15
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-darwin-all-static.tar.gz
|
16
16
|
universal-darwin:
|
17
|
-
checksum:
|
18
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
17
|
+
checksum: f4eaf9ef17f0c95adcc3b853f00134b28e1a50e33db48677dc3adfcbe48b14b4
|
18
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5f0c552/appsignal-x86_64-darwin-all-static.tar.gz
|
data/ext/extconf.rb
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require File.expand_path(
|
1
|
+
require "digest"
|
2
|
+
require "logger"
|
3
|
+
require "fileutils"
|
4
|
+
require "open-uri"
|
5
|
+
require "zlib"
|
6
|
+
require "rubygems/package"
|
7
|
+
require "yaml"
|
8
|
+
require File.expand_path("../../lib/appsignal/version.rb", __FILE__)
|
9
9
|
|
10
|
-
EXT_PATH = File.expand_path(
|
11
|
-
AGENT_CONFIG = YAML.load(File.read(File.join(EXT_PATH,
|
10
|
+
EXT_PATH = File.expand_path("..", __FILE__)
|
11
|
+
AGENT_CONFIG = YAML.load(File.read(File.join(EXT_PATH, "agent.yml")))
|
12
12
|
ARCH = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}"
|
13
|
-
CA_CERT_PATH = File.join(EXT_PATH,
|
13
|
+
CA_CERT_PATH = File.join(EXT_PATH, "../resources/cacert.pem")
|
14
14
|
|
15
15
|
def ext_path(path)
|
16
16
|
File.join(EXT_PATH, path)
|
17
17
|
end
|
18
18
|
|
19
19
|
def logger
|
20
|
-
@logger ||= Logger.new(File.join(EXT_PATH,
|
20
|
+
@logger ||= Logger.new(File.join(EXT_PATH, "install.log"))
|
21
21
|
end
|
22
22
|
|
23
23
|
def installation_failed(reason)
|
24
24
|
logger.error "Installation failed: #{reason}"
|
25
|
-
File.open(File.join(EXT_PATH,
|
26
|
-
|
25
|
+
File.open(File.join(EXT_PATH, "Makefile"), "w") do |file|
|
26
|
+
file.write "default:\nclean:\ninstall:"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -37,7 +37,7 @@ def install
|
|
37
37
|
return
|
38
38
|
end
|
39
39
|
|
40
|
-
unless AGENT_CONFIG[
|
40
|
+
unless AGENT_CONFIG["triples"].keys.include?(ARCH)
|
41
41
|
installation_failed(
|
42
42
|
"AppSignal currently does not support your system architecture (#{ARCH})." \
|
43
43
|
"Please let us know at support@appsignal.com, we aim to support everything our customers run."
|
@@ -45,21 +45,21 @@ def install
|
|
45
45
|
return
|
46
46
|
end
|
47
47
|
|
48
|
-
arch_config = AGENT_CONFIG[
|
48
|
+
arch_config = AGENT_CONFIG["triples"][ARCH]
|
49
49
|
|
50
|
-
unless File.exist?(ext_path(
|
51
|
-
|
52
|
-
|
53
|
-
logger.info "Downloading agent release from #{arch_config[
|
50
|
+
unless File.exist?(ext_path("appsignal-agent")) &&
|
51
|
+
File.exist?(ext_path("libappsignal.a")) &&
|
52
|
+
File.exist?(ext_path("appsignal.h"))
|
53
|
+
logger.info "Downloading agent release from #{arch_config["download_url"]}"
|
54
54
|
|
55
|
-
archive = open(arch_config[
|
55
|
+
archive = open(arch_config["download_url"], :ssl_ca_cert => CA_CERT_PATH)
|
56
56
|
|
57
|
-
if Digest::SHA256.hexdigest(archive.read) == arch_config[
|
58
|
-
logger.info
|
57
|
+
if Digest::SHA256.hexdigest(archive.read) == arch_config["checksum"]
|
58
|
+
logger.info "Checksum of downloaded archive verified, extracting archive"
|
59
59
|
else
|
60
60
|
installation_failed(
|
61
61
|
"Aborting installation, checksum of downloaded archive could not be verified: " \
|
62
|
-
"Expected '#{arch_config[
|
62
|
+
"Expected '#{arch_config["checksum"]}', got '#{checksum}'."
|
63
63
|
)
|
64
64
|
return
|
65
65
|
end
|
@@ -67,24 +67,24 @@ def install
|
|
67
67
|
Gem::Package::TarReader.new(Zlib::GzipReader.open(archive)) do |tar|
|
68
68
|
tar.each do |entry|
|
69
69
|
if entry.file?
|
70
|
-
File.open(ext_path(entry.full_name),
|
70
|
+
File.open(ext_path(entry.full_name), "wb") do |f|
|
71
71
|
f.write(entry.read)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
76
|
-
FileUtils.chmod(0755, ext_path(
|
76
|
+
FileUtils.chmod(0755, ext_path("appsignal-agent"))
|
77
77
|
end
|
78
78
|
|
79
79
|
logger.info "Creating makefile"
|
80
|
-
require
|
81
|
-
if !have_library(
|
82
|
-
installation_failed
|
83
|
-
elsif !find_executable(
|
84
|
-
installation_failed
|
80
|
+
require "mkmf"
|
81
|
+
if !have_library("appsignal", "appsignal_start", "appsignal.h")
|
82
|
+
installation_failed "Aborting installation, libappsignal.a or appsignal.h not found"
|
83
|
+
elsif !find_executable("appsignal-agent", EXT_PATH)
|
84
|
+
installation_failed "Aborting installation, appsignal-agent not found"
|
85
85
|
else
|
86
|
-
create_makefile
|
87
|
-
logger.info
|
86
|
+
create_makefile "appsignal_extension"
|
87
|
+
logger.info "Successfully created Makefile for appsignal extension"
|
88
88
|
end
|
89
89
|
rescue => ex
|
90
90
|
installation_failed "Exception while installing: #{ex}"
|