appsignal 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +63 -21
- data/.rubocop_todo.yml +68 -54
- data/.semaphore/semaphore.yml +11 -11
- data/CHANGELOG.md +37 -0
- data/Rakefile +15 -99
- data/appsignal.gemspec +3 -4
- data/bin/appsignal +4 -2
- data/build_matrix.yml +4 -4
- data/ext/._appsignal-agent +0 -0
- data/ext/Rakefile +22 -21
- data/ext/agent.rb +2 -0
- data/ext/base.rb +14 -17
- data/ext/extconf.rb +4 -1
- data/lib/appsignal/auth_check.rb +3 -3
- data/lib/appsignal/capistrano.rb +1 -1
- data/lib/appsignal/cli/demo.rb +5 -2
- data/lib/appsignal/cli/diagnose/paths.rb +4 -1
- data/lib/appsignal/cli/diagnose/utils.rb +7 -3
- data/lib/appsignal/cli/diagnose.rb +7 -5
- data/lib/appsignal/cli/helpers.rb +1 -4
- data/lib/appsignal/cli/install.rb +4 -10
- data/lib/appsignal/cli.rb +3 -2
- data/lib/appsignal/config.rb +105 -102
- data/lib/appsignal/demo.rb +2 -1
- data/lib/appsignal/environment.rb +2 -0
- data/lib/appsignal/event_formatter/action_view/render_formatter.rb +2 -1
- data/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb +13 -13
- data/lib/appsignal/event_formatter.rb +5 -4
- data/lib/appsignal/extension/jruby.rb +11 -9
- data/lib/appsignal/extension.rb +1 -1
- data/lib/appsignal/helpers/instrumentation.rb +50 -35
- data/lib/appsignal/hooks/action_cable.rb +6 -4
- data/lib/appsignal/hooks/action_mailer.rb +2 -0
- data/lib/appsignal/hooks/active_job.rb +11 -10
- data/lib/appsignal/hooks/active_support_notifications.rb +3 -4
- data/lib/appsignal/hooks/data_mapper.rb +1 -1
- data/lib/appsignal/hooks/gvl.rb +3 -0
- data/lib/appsignal/hooks/http.rb +1 -1
- data/lib/appsignal/hooks/mri.rb +2 -0
- data/lib/appsignal/hooks/net_http.rb +1 -1
- data/lib/appsignal/hooks/que.rb +1 -1
- data/lib/appsignal/hooks/rake.rb +1 -1
- data/lib/appsignal/hooks/redis.rb +1 -1
- data/lib/appsignal/hooks/resque.rb +1 -1
- data/lib/appsignal/hooks/shoryuken.rb +2 -4
- data/lib/appsignal/hooks/sidekiq.rb +1 -1
- data/lib/appsignal/hooks/unicorn.rb +2 -2
- data/lib/appsignal/hooks/webmachine.rb +1 -1
- data/lib/appsignal/hooks.rb +2 -2
- data/lib/appsignal/integrations/active_support_notifications.rb +1 -1
- data/lib/appsignal/integrations/capistrano/appsignal.cap +6 -3
- data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +5 -4
- data/lib/appsignal/integrations/delayed_job_plugin.rb +3 -5
- data/lib/appsignal/integrations/grape.rb +1 -1
- data/lib/appsignal/integrations/hanami.rb +1 -1
- data/lib/appsignal/integrations/object.rb +2 -3
- data/lib/appsignal/integrations/padrino.rb +2 -4
- data/lib/appsignal/integrations/que.rb +6 -6
- data/lib/appsignal/integrations/railtie.rb +72 -0
- data/lib/appsignal/integrations/sidekiq.rb +9 -11
- data/lib/appsignal/integrations/sinatra.rb +1 -3
- data/lib/appsignal/integrations/webmachine.rb +4 -6
- data/lib/appsignal/logger.rb +31 -6
- data/lib/appsignal/marker.rb +4 -5
- data/lib/appsignal/minutely.rb +7 -7
- data/lib/appsignal/probes/gvl.rb +9 -4
- data/lib/appsignal/probes/helpers.rb +4 -6
- data/lib/appsignal/probes/mri.rb +7 -5
- data/lib/appsignal/probes/sidekiq.rb +3 -0
- data/lib/appsignal/probes.rb +2 -0
- data/lib/appsignal/rack/generic_instrumentation.rb +1 -5
- data/lib/appsignal/rack/sinatra_instrumentation.rb +3 -5
- data/lib/appsignal/rack/streaming_listener.rb +11 -13
- data/lib/appsignal/span.rb +5 -5
- data/lib/appsignal/system.rb +10 -11
- data/lib/appsignal/transaction.rb +49 -25
- data/lib/appsignal/transmitter.rb +4 -2
- data/lib/appsignal/utils/deprecation_message.rb +2 -0
- data/lib/appsignal/utils/hash_sanitizer.rb +1 -1
- data/lib/appsignal/utils/integration_logger.rb +5 -3
- data/lib/appsignal/utils/json.rb +1 -1
- data/lib/appsignal/utils/query_params_sanitizer.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +5 -4
- data/lib/puma/plugin/appsignal.rb +16 -18
- data/script/lint_git +1 -1
- data/spec/lib/appsignal/capistrano2_spec.rb +6 -3
- data/spec/lib/appsignal/capistrano3_spec.rb +6 -3
- data/spec/lib/appsignal/cli/diagnose/utils_spec.rb +1 -3
- data/spec/lib/appsignal/cli/diagnose_spec.rb +33 -30
- data/spec/lib/appsignal/cli/install_spec.rb +5 -6
- data/spec/lib/appsignal/cli_spec.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +43 -37
- data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +11 -5
- data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +4 -4
- data/spec/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter_spec.rb +1 -4
- data/spec/lib/appsignal/event_formatter_spec.rb +11 -9
- data/spec/lib/appsignal/hooks/action_cable_spec.rb +5 -2
- data/spec/lib/appsignal/hooks/action_mailer_spec.rb +2 -1
- data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +1 -1
- data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +1 -1
- data/spec/lib/appsignal/hooks/activejob_spec.rb +21 -12
- data/spec/lib/appsignal/hooks/data_mapper_spec.rb +1 -0
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +12 -12
- data/spec/lib/appsignal/hooks/excon_spec.rb +2 -2
- data/spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb +3 -1
- data/spec/lib/appsignal/hooks/shoryuken_spec.rb +4 -2
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +2 -1
- data/spec/lib/appsignal/hooks_spec.rb +5 -4
- data/spec/lib/appsignal/integrations/grape_spec.rb +8 -4
- data/spec/lib/appsignal/integrations/hanami_spec.rb +16 -8
- data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +2 -4
- data/spec/lib/appsignal/integrations/object_spec.rb +6 -1
- data/spec/lib/appsignal/integrations/padrino_spec.rb +4 -2
- data/spec/lib/appsignal/integrations/railtie_spec.rb +213 -6
- data/spec/lib/appsignal/integrations/sidekiq_spec.rb +54 -41
- data/spec/lib/appsignal/logger_spec.rb +20 -4
- data/spec/lib/appsignal/marker_spec.rb +2 -2
- data/spec/lib/appsignal/minutely_spec.rb +3 -3
- data/spec/lib/appsignal/probes/gvl_spec.rb +60 -12
- data/spec/lib/appsignal/probes/mri_spec.rb +7 -4
- data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +2 -1
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +2 -1
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +10 -5
- data/spec/lib/appsignal/rack/streaming_listener_spec.rb +7 -5
- data/spec/lib/appsignal/transaction_spec.rb +20 -13
- data/spec/lib/appsignal/utils/data_spec.rb +10 -1
- data/spec/lib/appsignal/utils/hash_sanitizer_spec.rb +11 -11
- data/spec/lib/appsignal/utils/json_spec.rb +4 -2
- data/spec/lib/appsignal_spec.rb +49 -35
- data/spec/lib/puma/appsignal_spec.rb +9 -11
- data/spec/spec_helper.rb +14 -2
- data/spec/support/fixtures/projects/valid/config/appsignal.yml +1 -1
- data/spec/support/helpers/config_helpers.rb +2 -1
- data/spec/support/helpers/dependency_helper.rb +1 -9
- data/spec/support/helpers/std_streams_helper.rb +1 -3
- data/spec/support/helpers/wait_for_helper.rb +2 -3
- data/spec/support/mocks/appsignal_mock.rb +1 -1
- data/spec/support/mocks/fake_gvl_tools.rb +2 -10
- data/spec/support/testing.rb +4 -3
- metadata +9 -135
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 665e5db5581d8ac6e76d6ac3e77114609dcb8c9e2c5e9dce8d8746699ab74972
|
4
|
+
data.tar.gz: b397af1635bc09126afb56adfca4ade75673022b4936cc3eb04b991091c9d842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c092aee34ade269d6387ba522db9bf995298e70310e2080b718a154810d8378a4251d18e2d8e4659c266fa4b1da83f93c55127b6553f9b7db4a05ba0e9f1f3a
|
7
|
+
data.tar.gz: baf78dd3e737d4c8c1e546bb5c7d4b93ab9cf729d0c20b7a0865a7b83db012addaf400720e898d645e32ac12cd7536f0551d8a6f06c3b350b936598fc720e885
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
-
TargetRubyVersion:
|
4
|
+
TargetRubyVersion: 3.0
|
5
|
+
NewCops: enable
|
5
6
|
Include:
|
7
|
+
- "**/*.rb"
|
6
8
|
- "**/*.cap"
|
7
9
|
- "**/Gemfile"
|
8
10
|
- "**/Rakefile"
|
@@ -10,7 +12,6 @@ AllCops:
|
|
10
12
|
Exclude:
|
11
13
|
- "pkg/**/*"
|
12
14
|
- "tmp/**/*"
|
13
|
-
- "gemfiles/vendor/**/*"
|
14
15
|
- "vendor/**/*"
|
15
16
|
- "benchmark.rake"
|
16
17
|
- "spec/integration/diagnose/**/*"
|
@@ -18,7 +19,7 @@ AllCops:
|
|
18
19
|
UseCache: true
|
19
20
|
CacheRootDirectory: ./tmp
|
20
21
|
|
21
|
-
|
22
|
+
Style/RescueStandardError:
|
22
23
|
Enabled: false
|
23
24
|
|
24
25
|
Style/Documentation:
|
@@ -30,28 +31,13 @@ Style/StringLiterals:
|
|
30
31
|
Style/StringLiteralsInInterpolation:
|
31
32
|
EnforcedStyle: double_quotes
|
32
33
|
|
33
|
-
Layout/AlignParameters:
|
34
|
-
EnforcedStyle: with_fixed_indentation
|
35
|
-
|
36
|
-
Layout/MultilineMethodCallIndentation:
|
37
|
-
EnforcedStyle: indented
|
38
|
-
|
39
|
-
Layout/MultilineOperationIndentation:
|
40
|
-
EnforcedStyle: indented
|
41
|
-
|
42
34
|
Style/HashSyntax:
|
43
35
|
EnforcedStyle: hash_rockets
|
44
36
|
|
45
|
-
Layout/AlignHash:
|
46
|
-
EnforcedLastArgumentHashStyle: ignore_implicit
|
47
|
-
|
48
|
-
Layout/IndentArray:
|
49
|
-
EnforcedStyle: consistent
|
50
|
-
|
51
37
|
Style/EmptyMethod:
|
52
38
|
EnforcedStyle: expanded
|
53
39
|
|
54
|
-
Style/
|
40
|
+
Style/MissingRespondToMissing:
|
55
41
|
Exclude:
|
56
42
|
- "lib/appsignal/extension.rb"
|
57
43
|
- "lib/appsignal/transaction.rb"
|
@@ -65,19 +51,75 @@ Style/Lambda:
|
|
65
51
|
Style/WordArray:
|
66
52
|
Enabled: false
|
67
53
|
|
54
|
+
Lint/ConstantDefinitionInBlock:
|
55
|
+
Exclude:
|
56
|
+
- "spec/**/*.rb"
|
57
|
+
|
58
|
+
Lint/EmptyClass:
|
59
|
+
Exclude:
|
60
|
+
- "spec/**/*.rb"
|
61
|
+
|
62
|
+
Layout/HashAlignment:
|
63
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
64
|
+
|
65
|
+
Layout/ArgumentAlignment:
|
66
|
+
EnforcedStyle: with_fixed_indentation
|
67
|
+
|
68
|
+
Layout/LineContinuationLeadingSpace:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Layout/FirstArrayElementIndentation:
|
72
|
+
EnforcedStyle: consistent
|
73
|
+
|
74
|
+
Layout/LineEndStringConcatenationIndentation:
|
75
|
+
EnforcedStyle: indented
|
76
|
+
|
77
|
+
Layout/ParameterAlignment:
|
78
|
+
EnforcedStyle: with_fixed_indentation
|
79
|
+
|
80
|
+
Layout/MultilineMethodCallIndentation:
|
81
|
+
EnforcedStyle: indented
|
82
|
+
|
83
|
+
Layout/MultilineOperationIndentation:
|
84
|
+
EnforcedStyle: indented
|
85
|
+
|
86
|
+
Lint/EmptyFile:
|
87
|
+
Exclude:
|
88
|
+
- "spec/**/*.rb"
|
89
|
+
|
68
90
|
Naming/FileName:
|
69
91
|
Exclude:
|
70
92
|
- "ext/Rakefile"
|
71
93
|
|
94
|
+
Naming/RescuedExceptionsVariableName:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Naming/VariableNumber:
|
98
|
+
Enabled: false
|
99
|
+
|
100
|
+
Metrics/ClassLength:
|
101
|
+
Enabled: false
|
102
|
+
|
72
103
|
Metrics/BlockLength:
|
73
104
|
Exclude:
|
74
105
|
- "Rakefile"
|
75
106
|
|
76
107
|
Style/FrozenStringLiteralComment:
|
77
108
|
Enabled: true
|
109
|
+
Exclude:
|
110
|
+
- "spec/**/*.rb"
|
111
|
+
|
112
|
+
Style/NumericPredicate:
|
113
|
+
Enabled: false
|
78
114
|
|
79
115
|
Style/SymbolArray:
|
80
116
|
EnforcedStyle: brackets
|
81
117
|
|
82
|
-
|
83
|
-
|
118
|
+
Style/RedundantConstantBase:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
Gemspec/DevelopmentDependencies:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Layout/LineLength:
|
125
|
+
Max: 100
|
data/.rubocop_todo.yml
CHANGED
@@ -1,96 +1,110 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2023-04-12 14:23:03 UTC using RuboCop version 1.50.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 3
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
12
|
+
# URISchemes: http, https
|
13
|
+
Layout/LineLength:
|
14
|
+
Max: 112
|
15
|
+
|
16
|
+
# Offense count: 2
|
17
|
+
Lint/MissingSuper:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/appsignal/extension.rb'
|
20
|
+
- 'lib/appsignal/logger.rb'
|
21
|
+
|
22
|
+
# Offense count: 1
|
23
|
+
Lint/NoReturnInBeginEndBlocks:
|
24
|
+
Exclude:
|
25
|
+
- 'lib/appsignal/environment.rb'
|
26
|
+
|
27
|
+
# Offense count: 1
|
28
|
+
Lint/StructNewOverride:
|
29
|
+
Exclude:
|
30
|
+
- 'spec/lib/appsignal/probes/sidekiq_spec.rb'
|
31
|
+
|
32
|
+
# Offense count: 53
|
33
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
10
34
|
Metrics/AbcSize:
|
11
|
-
Max:
|
35
|
+
Max: 44
|
12
36
|
|
13
|
-
# Offense count:
|
14
|
-
# Configuration parameters: CountComments,
|
37
|
+
# Offense count: 5
|
38
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
39
|
+
# AllowedMethods: refine
|
15
40
|
Metrics/BlockLength:
|
16
41
|
Max: 31
|
17
42
|
|
18
|
-
# Offense count:
|
19
|
-
# Configuration parameters:
|
20
|
-
Metrics/ClassLength:
|
21
|
-
Exclude:
|
22
|
-
- "lib/appsignal/cli/diagnose.rb"
|
23
|
-
- "lib/appsignal/cli/install.rb"
|
24
|
-
- "lib/appsignal/config.rb"
|
25
|
-
- "lib/appsignal/transaction.rb"
|
26
|
-
|
27
|
-
# Offense count: 16
|
43
|
+
# Offense count: 17
|
44
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
28
45
|
Metrics/CyclomaticComplexity:
|
29
46
|
Max: 11
|
30
47
|
|
31
|
-
# Offense count:
|
32
|
-
# Configuration parameters:
|
33
|
-
# URISchemes: http, https
|
34
|
-
Layout/LineLength:
|
35
|
-
Max: 152
|
36
|
-
|
37
|
-
# Offense count: 109
|
38
|
-
# Configuration parameters: CountComments.
|
48
|
+
# Offense count: 127
|
49
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
39
50
|
Metrics/MethodLength:
|
40
|
-
Max:
|
41
|
-
|
42
|
-
# Offense count: 1
|
43
|
-
# Configuration parameters: CountComments.
|
44
|
-
Metrics/ModuleLength:
|
45
|
-
Exclude:
|
46
|
-
- "lib/appsignal.rb"
|
51
|
+
Max: 56
|
47
52
|
|
48
|
-
# Offense count:
|
53
|
+
# Offense count: 12
|
54
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
49
55
|
Metrics/PerceivedComplexity:
|
50
|
-
Max:
|
56
|
+
Max: 13
|
51
57
|
|
52
|
-
# Offense count:
|
58
|
+
# Offense count: 7
|
53
59
|
Naming/AccessorMethodName:
|
54
60
|
Exclude:
|
55
61
|
- 'lib/appsignal/helpers/instrumentation.rb'
|
56
62
|
- 'lib/appsignal/transaction.rb'
|
57
63
|
|
58
|
-
# Offense count:
|
59
|
-
|
60
|
-
Security/YAMLLoad:
|
64
|
+
# Offense count: 2
|
65
|
+
Security/Open:
|
61
66
|
Exclude:
|
62
67
|
- 'ext/base.rb'
|
68
|
+
|
69
|
+
# Offense count: 2
|
70
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
71
|
+
Security/YAMLLoad:
|
72
|
+
Exclude:
|
63
73
|
- 'lib/appsignal/config.rb'
|
64
|
-
- 'lib/appsignal/extension.rb'
|
65
74
|
- 'lib/appsignal/integrations/sidekiq.rb'
|
66
75
|
|
67
|
-
# Offense count:
|
68
|
-
#
|
69
|
-
# Configuration parameters: EnforcedStyle
|
76
|
+
# Offense count: 7
|
77
|
+
# This cop supports safe autocorrection (--autocorrect).
|
78
|
+
# Configuration parameters: EnforcedStyle.
|
70
79
|
# SupportedStyles: prefer_alias, prefer_alias_method
|
71
80
|
Style/Alias:
|
72
81
|
Exclude:
|
73
|
-
- 'lib/appsignal.rb'
|
74
82
|
- 'lib/appsignal/helpers/instrumentation.rb'
|
75
|
-
- 'lib/appsignal/hooks/active_support_notifications.rb'
|
76
|
-
- 'lib/appsignal/hooks/celluloid.rb'
|
77
|
-
- 'lib/appsignal/hooks/net_http.rb'
|
78
|
-
- 'lib/appsignal/hooks/puma.rb'
|
79
|
-
- 'lib/appsignal/hooks/rake.rb'
|
80
|
-
- 'lib/appsignal/hooks/redis.rb'
|
81
|
-
- 'lib/appsignal/hooks/unicorn.rb'
|
82
|
-
- 'lib/appsignal/hooks/webmachine.rb'
|
83
83
|
- 'lib/appsignal/transaction.rb'
|
84
84
|
|
85
|
-
# Offense count:
|
86
|
-
#
|
85
|
+
# Offense count: 2
|
86
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
87
|
+
# Configuration parameters: EnforcedStyle.
|
87
88
|
# SupportedStyles: nested, compact
|
88
89
|
Style/ClassAndModuleChildren:
|
89
90
|
Exclude:
|
90
|
-
- 'lib/appsignal/integrations/padrino.rb'
|
91
91
|
- 'lib/appsignal/integrations/hanami.rb'
|
92
|
+
- 'lib/appsignal/integrations/padrino.rb'
|
92
93
|
|
93
94
|
# Offense count: 1
|
94
|
-
Style/
|
95
|
+
Style/ClassVars:
|
96
|
+
Exclude:
|
97
|
+
- 'spec/lib/appsignal/event_formatter_spec.rb'
|
98
|
+
|
99
|
+
# Offense count: 1
|
100
|
+
Style/OpenStructUse:
|
101
|
+
Exclude:
|
102
|
+
- 'lib/appsignal/cli/install.rb'
|
103
|
+
|
104
|
+
# Offense count: 2
|
105
|
+
# Configuration parameters: AllowedMethods.
|
106
|
+
# AllowedMethods: respond_to_missing?
|
107
|
+
Style/OptionalBooleanParameter:
|
95
108
|
Exclude:
|
96
|
-
- 'lib/appsignal.rb'
|
109
|
+
- 'lib/appsignal/integrations/delayed_job_plugin.rb'
|
110
|
+
- 'lib/appsignal/utils/query_params_sanitizer.rb'
|
data/.semaphore/semaphore.yml
CHANGED
@@ -1192,7 +1192,7 @@ blocks:
|
|
1192
1192
|
value: latest
|
1193
1193
|
commands:
|
1194
1194
|
- "./support/bundler_wrapper exec rake test"
|
1195
|
-
- name: Ruby jruby-9.4.
|
1195
|
+
- name: Ruby jruby-9.4.1.0
|
1196
1196
|
dependencies:
|
1197
1197
|
- Validation
|
1198
1198
|
task:
|
@@ -1208,14 +1208,14 @@ blocks:
|
|
1208
1208
|
- "./support/bundler_wrapper exec rake extension:install"
|
1209
1209
|
epilogue: *1
|
1210
1210
|
jobs:
|
1211
|
-
- name: Ruby jruby-9.4.
|
1211
|
+
- name: Ruby jruby-9.4.1.0 for no_dependencies
|
1212
1212
|
env_vars:
|
1213
1213
|
- *2
|
1214
1214
|
- *3
|
1215
1215
|
- *4
|
1216
1216
|
- *5
|
1217
1217
|
- name: RUBY_VERSION
|
1218
|
-
value: jruby-9.4.
|
1218
|
+
value: jruby-9.4.1.0
|
1219
1219
|
- name: GEMSET
|
1220
1220
|
value: no_dependencies
|
1221
1221
|
- name: BUNDLE_GEMFILE
|
@@ -1227,9 +1227,9 @@ blocks:
|
|
1227
1227
|
commands:
|
1228
1228
|
- "./support/bundler_wrapper exec rake test"
|
1229
1229
|
- "./support/bundler_wrapper exec rake test:failure"
|
1230
|
-
- name: Ruby jruby-9.4.
|
1230
|
+
- name: Ruby jruby-9.4.1.0 - Gems
|
1231
1231
|
dependencies:
|
1232
|
-
- Ruby jruby-9.4.
|
1232
|
+
- Ruby jruby-9.4.1.0
|
1233
1233
|
task:
|
1234
1234
|
prologue:
|
1235
1235
|
commands:
|
@@ -1243,14 +1243,14 @@ blocks:
|
|
1243
1243
|
- "./support/bundler_wrapper exec rake extension:install"
|
1244
1244
|
epilogue: *1
|
1245
1245
|
jobs:
|
1246
|
-
- name: Ruby jruby-9.4.
|
1246
|
+
- name: Ruby jruby-9.4.1.0 for rails-6.0
|
1247
1247
|
env_vars:
|
1248
1248
|
- *2
|
1249
1249
|
- *3
|
1250
1250
|
- *4
|
1251
1251
|
- *5
|
1252
1252
|
- name: RUBY_VERSION
|
1253
|
-
value: jruby-9.4.
|
1253
|
+
value: jruby-9.4.1.0
|
1254
1254
|
- name: GEMSET
|
1255
1255
|
value: rails-6.0
|
1256
1256
|
- name: BUNDLE_GEMFILE
|
@@ -1261,14 +1261,14 @@ blocks:
|
|
1261
1261
|
value: latest
|
1262
1262
|
commands:
|
1263
1263
|
- "./support/bundler_wrapper exec rake test"
|
1264
|
-
- name: Ruby jruby-9.4.
|
1264
|
+
- name: Ruby jruby-9.4.1.0 for rails-6.1
|
1265
1265
|
env_vars:
|
1266
1266
|
- *2
|
1267
1267
|
- *3
|
1268
1268
|
- *4
|
1269
1269
|
- *5
|
1270
1270
|
- name: RUBY_VERSION
|
1271
|
-
value: jruby-9.4.
|
1271
|
+
value: jruby-9.4.1.0
|
1272
1272
|
- name: GEMSET
|
1273
1273
|
value: rails-6.1
|
1274
1274
|
- name: BUNDLE_GEMFILE
|
@@ -1279,14 +1279,14 @@ blocks:
|
|
1279
1279
|
value: latest
|
1280
1280
|
commands:
|
1281
1281
|
- "./support/bundler_wrapper exec rake test"
|
1282
|
-
- name: Ruby jruby-9.4.
|
1282
|
+
- name: Ruby jruby-9.4.1.0 for rails-7.0
|
1283
1283
|
env_vars:
|
1284
1284
|
- *2
|
1285
1285
|
- *3
|
1286
1286
|
- *4
|
1287
1287
|
- *5
|
1288
1288
|
- name: RUBY_VERSION
|
1289
|
-
value: jruby-9.4.
|
1289
|
+
value: jruby-9.4.1.0
|
1290
1290
|
- name: GEMSET
|
1291
1291
|
value: rails-7.0
|
1292
1292
|
- name: BUNDLE_GEMFILE
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,42 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.4.1
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- [77ce4e39](https://github.com/appsignal/appsignal-ruby/commit/77ce4e3997fc7525d71f705cb332c05765568dc6) patch - Add Rails [error reporter](https://guides.rubyonrails.org/error_reporting.html) support. Errors reported using `Rails.error.handle` are tracked as separate errors in AppSignal. We rely on our other Rails instrumentation to report the errors reported with `Rails.error.record`.
|
8
|
+
|
9
|
+
The error is reported under the same controller/job name, on a best effort basis. It may not be 100% accurate. If `Rails.error.handle` is called within a Rails controller or Active Job job, it will copy the AppSignal transaction namespace, action name and tags from the current transaction to the transaction for the `Rails.error.handle` reported error. If you call `Appsignal.set_namespace`, `Appsignal.set_action` or `Appsignal.tag_request` after `Rails.error.handle`, those changes will not be reflected up in the already reported error.
|
10
|
+
|
11
|
+
It is also possible to customize the AppSignal namespace and action name for the reported error using the `appsignal` context:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
Rails.error.handle(:context => { :appsignal => { :namespace => "context", :action => "ContextAction" } }) do
|
15
|
+
raise "Test"
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
All other key-values are reported as tags:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
Rails.error.handle(:context => { :tag_key => "tag value" }) do
|
23
|
+
raise "Test"
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
27
|
+
Integration with the Rails error reporter is enabled by default. Disable this feature by setting the `enable_rails_error_reporter` config option to `false`.
|
28
|
+
- [b4f58afd](https://github.com/appsignal/appsignal-ruby/commit/b4f58afdeb80cd1eb336ec5bd7b5daf46a4ef0a8) patch - Support Sidekiq in Rails error reporter. Track errors reported using `Rails.error.handle` in Sidekiq jobs, in the correct action. Previously it would report no action name for the incident, now it will use the worker name by default.
|
29
|
+
|
30
|
+
### Changed
|
31
|
+
|
32
|
+
- [e0332791](https://github.com/appsignal/appsignal-ruby/commit/e03327913fdc19db68fc953308eb1e4f2441ba05) patch - Set the AppSignal transaction namespace, action name and some tags, before Active Job jobs are performed. This allows us to check what the namespace, action name and some tags are during the instrumentation itself.
|
33
|
+
- [4a40699a](https://github.com/appsignal/appsignal-ruby/commit/4a40699a1655bc10b3fa6eb90135374a6b31b195) patch - The AppSignal gem requires Ruby 3 or higher to run. Remove unnecessary Ruby version checks that query Ruby 2.7 or lower.
|
34
|
+
- [da7d1c76](https://github.com/appsignal/appsignal-ruby/commit/da7d1c762fa097080b884bccf7c083aa692803bc) patch - Internal refactor of Ruby code due to RuboCop upgrade. Use the public `prepend` method to prepend AppSignal instrumentation modules.
|
35
|
+
|
36
|
+
### Fixed
|
37
|
+
|
38
|
+
- [009d533f](https://github.com/appsignal/appsignal-ruby/commit/009d533f92b08663eca1460b990524d56322fb65) patch - Fix a bug when using ActiveSupport::TaggedLogging calling the `silence` method.
|
39
|
+
|
3
40
|
## 3.4.0
|
4
41
|
|
5
42
|
### Deprecated
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "bundler"
|
2
4
|
require "rubygems/package_task"
|
3
5
|
require "fileutils"
|
@@ -89,9 +91,7 @@ namespace :build_matrix do
|
|
89
91
|
end
|
90
92
|
end
|
91
93
|
builds << ruby_primary_block
|
92
|
-
if ruby_secondary_block["task"]["jobs"].count.nonzero?
|
93
|
-
builds << ruby_secondary_block
|
94
|
-
end
|
94
|
+
builds << ruby_secondary_block if ruby_secondary_block["task"]["jobs"].count.nonzero?
|
95
95
|
end
|
96
96
|
semaphore["blocks"] += builds
|
97
97
|
|
@@ -130,6 +130,7 @@ namespace :build_matrix do
|
|
130
130
|
matrix["ruby"].each do |ruby|
|
131
131
|
ruby_version = ruby["ruby"]
|
132
132
|
out << "echo 'Switching to #{ruby_version}'"
|
133
|
+
# rubocop:disable Layout/LineLength
|
133
134
|
out << "#{config[:switch_command].call(ruby_version)} || { echo 'Switching Ruby failed'; exit 1; }"
|
134
135
|
out << "ruby -v"
|
135
136
|
out << "echo 'Compiling extension'"
|
@@ -150,6 +151,7 @@ namespace :build_matrix do
|
|
150
151
|
out << "echo 'Running #{gemfile} in #{ruby_version}'"
|
151
152
|
out << "#{bundler_version} #{gemfile_env} ./support/bundler_wrapper exec rspec || { echo 'Running specs failed'; exit 1; }"
|
152
153
|
end
|
154
|
+
# rubocop:enable Layout/LineLength
|
153
155
|
out << ""
|
154
156
|
end
|
155
157
|
out << "rm -f .ruby-version"
|
@@ -157,9 +159,7 @@ namespace :build_matrix do
|
|
157
159
|
|
158
160
|
script = "bundle_and_spec_all_#{version_manager}"
|
159
161
|
FileUtils.rm_f(script)
|
160
|
-
File.
|
161
|
-
file.write out.join("\n")
|
162
|
-
end
|
162
|
+
File.write(script, out.join("\n"))
|
163
163
|
File.chmod(0o775, script)
|
164
164
|
puts "Generated #{script}"
|
165
165
|
end
|
@@ -209,20 +209,18 @@ namespace :build do
|
|
209
209
|
eval(File.read("appsignal.gemspec")) # rubocop:disable Security/Eval
|
210
210
|
end
|
211
211
|
|
212
|
-
def modify_base_gemspec
|
213
|
-
base_gemspec.tap
|
214
|
-
yield s
|
215
|
-
end
|
212
|
+
def modify_base_gemspec(&block)
|
213
|
+
base_gemspec.tap(&block)
|
216
214
|
end
|
217
215
|
|
218
216
|
def define_build_task(task_name, base_gemspec, &block)
|
219
217
|
Gem::PackageTask.new(base_gemspec, &block)
|
220
|
-
rescue StandardError =>
|
218
|
+
rescue StandardError => e
|
221
219
|
puts "Warning: An error occurred defining `build:#{task_name}:gem` Rake task."
|
222
220
|
puts "This task will not be availble."
|
223
221
|
if ENV["DEBUG"]
|
224
|
-
puts "#{
|
225
|
-
puts
|
222
|
+
puts "#{e}: #{e.message}"
|
223
|
+
puts e.backtrace
|
226
224
|
else
|
227
225
|
puts "For more information, run the same command with `DEBUG=true`."
|
228
226
|
end
|
@@ -231,7 +229,7 @@ namespace :build do
|
|
231
229
|
|
232
230
|
namespace :ruby do
|
233
231
|
# Extension default set in `appsignal.gemspec`
|
234
|
-
define_build_task(:ruby, base_gemspec) { |_pkg| }
|
232
|
+
define_build_task(:ruby, base_gemspec) { |_pkg| } # rubocop:disable Lint/EmptyBlock
|
235
233
|
end
|
236
234
|
|
237
235
|
namespace :jruby do
|
@@ -243,7 +241,7 @@ namespace :build do
|
|
243
241
|
s.add_dependency "ffi"
|
244
242
|
end
|
245
243
|
|
246
|
-
define_build_task(:jruby, spec) { |_pkg| }
|
244
|
+
define_build_task(:jruby, spec) { |_pkg| } # rubocop:disable Lint/EmptyBlock
|
247
245
|
end
|
248
246
|
|
249
247
|
desc "Build all gem versions"
|
@@ -251,91 +249,9 @@ namespace :build do
|
|
251
249
|
|
252
250
|
desc "Clean up all gem build artifacts"
|
253
251
|
task :clean do
|
254
|
-
FileUtils.rm_rf File.expand_path("
|
255
|
-
end
|
256
|
-
end
|
257
|
-
|
258
|
-
namespace :publish do
|
259
|
-
VERSION_FILE = "lib/appsignal/version.rb".freeze
|
260
|
-
CHANGELOG_FILE = "CHANGELOG.md".freeze
|
261
|
-
|
262
|
-
def changes
|
263
|
-
git_status_to_array(`git status -s -u`)
|
264
|
-
end
|
265
|
-
|
266
|
-
def git_status_to_array(changes)
|
267
|
-
changes.split("\n").each { |change| change.gsub!(/^.. /, "") }
|
268
|
-
end
|
269
|
-
|
270
|
-
def current_branch
|
271
|
-
`git rev-parse --abbrev-ref HEAD`.chomp
|
272
|
-
end
|
273
|
-
|
274
|
-
task :check_requirements do
|
275
|
-
unless changes.empty?
|
276
|
-
puts "ERROR: There should be no uncommitted file changes."
|
277
|
-
exit 1
|
278
|
-
end
|
279
|
-
unless ENV["EDITOR"]
|
280
|
-
puts "ERROR: $EDITOR environment variable should be set."
|
281
|
-
exit 1
|
282
|
-
end
|
283
|
-
end
|
284
|
-
|
285
|
-
task :configure_version do
|
286
|
-
puts "\n# Configuring new gem version"
|
287
|
-
|
288
|
-
system "$EDITOR #{VERSION_FILE}"
|
289
|
-
unless changes.member?(VERSION_FILE)
|
290
|
-
puts "ERROR: Please actually change the gem version in: #{VERSION_FILE}"
|
291
|
-
exit 1
|
292
|
-
end
|
293
|
-
|
294
|
-
puts "\n# Updating the changelog"
|
295
|
-
system "$EDITOR #{CHANGELOG_FILE}"
|
296
|
-
end
|
297
|
-
|
298
|
-
task :push_gem_packages do
|
299
|
-
puts "\n# Pushing gem packages"
|
300
|
-
Dir.chdir("#{File.dirname(__FILE__)}/pkg") do
|
301
|
-
Dir["*.gem"].each do |gem_package|
|
302
|
-
puts "## Publishing gem package: #{gem_package}"
|
303
|
-
result = system "gem push #{gem_package}"
|
304
|
-
raise "Failed to Push gem" unless result
|
305
|
-
end
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
task :tag_and_push_version do
|
310
|
-
# Make sure to load the new version number
|
311
|
-
Appsignal.send(:remove_const, :VERSION)
|
312
|
-
load File.expand_path(VERSION_FILE)
|
313
|
-
version = "v#{Appsignal::VERSION}"
|
314
|
-
|
315
|
-
begin
|
316
|
-
puts `git commit -am 'Bump to #{version} [ci skip]'`
|
317
|
-
puts "# Creating tag #{version}"
|
318
|
-
puts `git tag #{version}`
|
319
|
-
puts `git push origin #{version}`
|
320
|
-
puts `git push origin #{current_branch}`
|
321
|
-
rescue
|
322
|
-
puts "ERROR: Tag '#{version}' already exists"
|
323
|
-
exit 1
|
324
|
-
end
|
325
|
-
end
|
326
|
-
|
327
|
-
task :build => "build:clean" do
|
328
|
-
# Shell out to build so the new version is loaded in the gemspec.
|
329
|
-
`rake build:all`
|
252
|
+
FileUtils.rm_rf File.expand_path("pkg", __dir__)
|
330
253
|
end
|
331
254
|
end
|
332
|
-
task :publish => [
|
333
|
-
"publish:check_requirements",
|
334
|
-
"publish:configure_version",
|
335
|
-
"publish:build",
|
336
|
-
"publish:push_gem_packages",
|
337
|
-
"publish:tag_and_push_version"
|
338
|
-
]
|
339
255
|
|
340
256
|
desc "Install the AppSignal gem, extension and all possible dependencies."
|
341
257
|
task :install => "extension:install" do
|
@@ -425,7 +341,7 @@ begin
|
|
425
341
|
desc "Run the Appsignal gem test in an extension failure scenario"
|
426
342
|
task :failure => [:prepare_failure, :rspec_failure]
|
427
343
|
end
|
428
|
-
rescue LoadError
|
344
|
+
rescue LoadError
|
429
345
|
# When running rake install, there is no RSpec yet.
|
430
346
|
end
|
431
347
|
|
data/appsignal.gemspec
CHANGED
@@ -10,14 +10,13 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
10
10
|
]
|
11
11
|
gem.email = ["support@appsignal.com"]
|
12
12
|
gem.description = "The official appsignal.com gem"
|
13
|
-
gem.summary = "Logs performance and exception data from your app to "\
|
14
|
-
|
13
|
+
gem.summary = "Logs performance and exception data from your app to " \
|
14
|
+
"appsignal.com"
|
15
15
|
gem.homepage = "https://github.com/appsignal/appsignal-ruby"
|
16
16
|
gem.license = "MIT"
|
17
17
|
|
18
18
|
gem.files = `git ls-files`.split($\).reject { |f| f.start_with?(".changesets/") } # rubocop:disable Style/SpecialGlobalVars
|
19
19
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
20
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
20
|
gem.name = "appsignal"
|
22
21
|
gem.require_paths = %w[lib ext]
|
23
22
|
gem.version = Appsignal::VERSION
|
@@ -41,7 +40,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
41
40
|
gem.add_development_dependency "pry"
|
42
41
|
gem.add_development_dependency "rake", ">= 12"
|
43
42
|
gem.add_development_dependency "rspec", "~> 3.8"
|
44
|
-
gem.add_development_dependency "rubocop"
|
43
|
+
gem.add_development_dependency "rubocop", "1.50.0"
|
45
44
|
gem.add_development_dependency "timecop"
|
46
45
|
gem.add_development_dependency "webmock"
|
47
46
|
gem.add_development_dependency "yard", ">= 0.9.20"
|
data/bin/appsignal
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
|
4
5
|
require "appsignal/cli"
|
@@ -7,7 +8,8 @@ begin
|
|
7
8
|
Appsignal::CLI.run
|
8
9
|
rescue => e
|
9
10
|
raise e if $DEBUG
|
10
|
-
|
11
|
-
|
11
|
+
|
12
|
+
warn e.message
|
13
|
+
warn e.backtrace.join("\n")
|
12
14
|
exit 1
|
13
15
|
end
|