appsignal 3.9.2-java → 3.10.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3138 -0
- data/.rubocop.yml +28 -20
- data/.rubocop_todo.yml +7 -33
- data/CHANGELOG.md +130 -0
- data/README.md +0 -1
- data/Rakefile +80 -65
- data/appsignal.gemspec +1 -1
- data/build_matrix.yml +112 -184
- data/ext/base.rb +1 -1
- data/gemfiles/hanami-2.1.gemfile +7 -0
- data/gemfiles/webmachine1.gemfile +5 -4
- data/lib/appsignal/cli/diagnose.rb +1 -1
- data/lib/appsignal/config.rb +5 -1
- data/lib/appsignal/demo.rb +0 -1
- data/lib/appsignal/environment.rb +11 -2
- data/lib/appsignal/extension/jruby.rb +1 -1
- data/lib/appsignal/helpers/instrumentation.rb +164 -2
- data/lib/appsignal/hooks/active_job.rb +1 -6
- data/lib/appsignal/integrations/grape.rb +19 -47
- data/lib/appsignal/integrations/hanami.rb +8 -7
- data/lib/appsignal/integrations/padrino.rb +51 -52
- data/lib/appsignal/integrations/railtie.rb +0 -3
- data/lib/appsignal/integrations/rake.rb +46 -12
- data/lib/appsignal/integrations/sidekiq.rb +1 -11
- data/lib/appsignal/integrations/sinatra.rb +0 -1
- data/lib/appsignal/integrations/webmachine.rb +15 -9
- data/lib/appsignal/probes/gvl.rb +24 -2
- data/lib/appsignal/probes/sidekiq.rb +1 -1
- data/lib/appsignal/probes.rb +1 -1
- data/lib/appsignal/rack/abstract_middleware.rb +104 -33
- data/lib/appsignal/rack/body_wrapper.rb +143 -0
- data/lib/appsignal/rack/event_handler.rb +12 -3
- data/lib/appsignal/rack/generic_instrumentation.rb +5 -4
- data/lib/appsignal/rack/grape_middleware.rb +40 -0
- data/lib/appsignal/rack/hanami_middleware.rb +2 -12
- data/lib/appsignal/rack/instrumentation_middleware.rb +62 -0
- data/lib/appsignal/rack/rails_instrumentation.rb +14 -57
- data/lib/appsignal/rack/sinatra_instrumentation.rb +1 -3
- data/lib/appsignal/rack/streaming_listener.rb +13 -59
- data/lib/appsignal/rack.rb +31 -0
- data/lib/appsignal/transaction.rb +50 -8
- data/lib/appsignal/utils/integration_memory_logger.rb +78 -0
- data/lib/appsignal/utils.rb +1 -0
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +36 -33
- data/spec/.rubocop.yml +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +1 -1
- data/spec/lib/appsignal/cli/install_spec.rb +3 -3
- data/spec/lib/appsignal/config_spec.rb +8 -5
- data/spec/lib/appsignal/demo_spec.rb +38 -41
- data/spec/lib/appsignal/hooks/action_cable_spec.rb +86 -167
- data/spec/lib/appsignal/hooks/active_support_notifications/finish_with_state_shared_examples.rb +8 -20
- data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +38 -84
- data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +16 -37
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +4 -4
- data/spec/lib/appsignal/hooks/activejob_spec.rb +111 -200
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +54 -91
- data/spec/lib/appsignal/hooks/dry_monitor_spec.rb +14 -32
- data/spec/lib/appsignal/hooks/excon_spec.rb +8 -12
- data/spec/lib/appsignal/hooks/net_http_spec.rb +7 -42
- data/spec/lib/appsignal/hooks/rake_spec.rb +107 -34
- data/spec/lib/appsignal/hooks/redis_client_spec.rb +18 -30
- data/spec/lib/appsignal/hooks/redis_spec.rb +10 -16
- data/spec/lib/appsignal/hooks/resque_spec.rb +42 -62
- data/spec/lib/appsignal/hooks/shoryuken_spec.rb +33 -74
- data/spec/lib/appsignal/integrations/hanami_spec.rb +79 -21
- data/spec/lib/appsignal/integrations/http_spec.rb +12 -20
- data/spec/lib/appsignal/integrations/net_http_spec.rb +33 -0
- data/spec/lib/appsignal/integrations/object_spec.rb +29 -36
- data/spec/lib/appsignal/integrations/padrino_spec.rb +190 -163
- data/spec/lib/appsignal/integrations/que_spec.rb +43 -70
- data/spec/lib/appsignal/integrations/railtie_spec.rb +26 -67
- data/spec/lib/appsignal/integrations/sidekiq_spec.rb +86 -160
- data/spec/lib/appsignal/integrations/sinatra_spec.rb +10 -3
- data/spec/lib/appsignal/integrations/webmachine_spec.rb +77 -40
- data/spec/lib/appsignal/probes/gvl_spec.rb +80 -3
- data/spec/lib/appsignal/probes_spec.rb +7 -4
- data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +302 -105
- data/spec/lib/appsignal/rack/body_wrapper_spec.rb +263 -0
- data/spec/lib/appsignal/rack/event_handler_spec.rb +81 -78
- data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +70 -27
- data/spec/lib/appsignal/rack/grape_middleware_spec.rb +234 -0
- data/spec/lib/appsignal/rack/hanami_middleware_spec.rb +2 -16
- data/spec/lib/appsignal/rack/instrumentation_middleware_spec.rb +38 -0
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +67 -131
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +36 -44
- data/spec/lib/appsignal/rack/streaming_listener_spec.rb +44 -139
- data/spec/lib/appsignal/transaction_spec.rb +239 -94
- data/spec/lib/appsignal/utils/integration_memory_logger_spec.rb +163 -0
- data/spec/lib/appsignal_spec.rb +556 -344
- data/spec/support/helpers/dependency_helper.rb +6 -1
- data/spec/support/helpers/std_streams_helper.rb +1 -1
- data/spec/support/helpers/transaction_helpers.rb +8 -0
- data/spec/support/matchers/transaction.rb +185 -0
- data/spec/support/mocks/dummy_app.rb +20 -0
- data/spec/support/shared_examples/instrument.rb +17 -12
- data/spec/support/testing.rb +18 -9
- metadata +20 -11
- data/.semaphore/semaphore.yml +0 -2347
- data/script/lint_git +0 -22
- data/spec/lib/appsignal/integrations/grape_spec.rb +0 -239
- data/spec/support/matchers/be_completed.rb +0 -5
- data/support/check_versions +0 -22
- /data/gemfiles/{hanami.gemfile → hanami-2.0.gemfile} +0 -0
data/build_matrix.yml
CHANGED
@@ -1,158 +1,79 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
github:
|
2
|
+
name: Ruby gem CI
|
3
|
+
"on":
|
4
|
+
push:
|
5
|
+
branches: ["main", "develop"]
|
6
|
+
pull_request:
|
7
|
+
types: [opened, reopened, synchronize]
|
8
|
+
schedule:
|
9
|
+
- cron: "0 0 * * 1-5"
|
4
10
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
os_image: ubuntu2004
|
11
|
+
concurrency:
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
13
|
+
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
|
9
14
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
+
jobs:
|
16
|
+
lint-git:
|
17
|
+
name: "Git linter (Lintje)"
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
if: ${{ github.event_name != 'schedule' }}
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v4
|
22
|
+
with:
|
23
|
+
fetch-depth: 0 # Fetch depth is required
|
24
|
+
- name: "Run Git linter"
|
25
|
+
uses: lintje/action@v0.11
|
15
26
|
|
16
|
-
|
17
|
-
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
- rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
|
28
|
-
- |
|
29
|
-
if [ -n "$RUBY_VERSION" ]; then
|
30
|
-
if ! (sem-version ruby "$RUBY_VERSION"); then
|
31
|
-
ruby_key="rbenv-ruby-$RUBY_VERSION"
|
32
|
-
echo "Attempting to build Ruby $RUBY_VERSION from source"
|
33
|
-
git -C "$HOME/.rbenv/plugins/ruby-build" pull
|
34
|
-
cache restore "$ruby_key"
|
35
|
-
sem-version ruby "$RUBY_VERSION"
|
36
|
-
if ! cache has_key "$ruby_key"; then
|
37
|
-
cache store "$ruby_key" "$HOME/.rbenv/versions/$RUBY_VERSION"
|
38
|
-
fi
|
39
|
-
fi
|
40
|
-
./support/check_versions
|
41
|
-
else
|
42
|
-
echo Skipping Ruby install
|
43
|
-
fi
|
27
|
+
lint-style:
|
28
|
+
name: "Ruby style linter (RuboCop)"
|
29
|
+
runs-on: ubuntu-latest
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v4
|
32
|
+
- uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: "3.3"
|
35
|
+
bundler-cache: true
|
36
|
+
- name: "Run RuboCop"
|
37
|
+
run: bundle exec rubocop
|
44
38
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
|
55
|
-
- name: Validate CI setup
|
56
|
-
env_vars:
|
57
|
-
- name: RUBY_VERSION
|
58
|
-
value: 3.2.2
|
59
|
-
- name: GEMSET
|
60
|
-
value: no_dependencies
|
61
|
-
- name: BUNDLE_GEMFILE
|
62
|
-
value: Gemfile
|
63
|
-
commands:
|
64
|
-
- ./support/bundler_wrapper exec rake build_matrix:semaphore:validate
|
65
|
-
epilogue:
|
66
|
-
on_pass:
|
67
|
-
commands:
|
68
|
-
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) .bundle
|
69
|
-
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) $HOME/.gem
|
70
|
-
- name: Ruby linters
|
71
|
-
dependencies: []
|
72
|
-
task:
|
73
|
-
prologue:
|
74
|
-
commands:
|
75
|
-
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec)
|
76
|
-
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec)
|
77
|
-
- ./support/bundler_wrapper install --jobs=3 --retry=3
|
78
|
-
jobs:
|
79
|
-
- name: RuboCop
|
80
|
-
env_vars:
|
81
|
-
- name: RUBY_VERSION
|
82
|
-
value: 3.2.2
|
83
|
-
- name: GEMSET
|
84
|
-
value: no_dependencies
|
85
|
-
- name: BUNDLE_GEMFILE
|
86
|
-
value: Gemfile
|
87
|
-
commands:
|
88
|
-
- ./support/bundler_wrapper exec rubocop
|
89
|
-
epilogue:
|
90
|
-
on_pass:
|
91
|
-
commands:
|
92
|
-
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) .bundle
|
93
|
-
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) $HOME/.gem
|
94
|
-
- name: Other linters
|
95
|
-
dependencies: []
|
96
|
-
task:
|
97
|
-
jobs:
|
98
|
-
- name: Git Lint (Lintje)
|
99
|
-
commands:
|
100
|
-
- script/lint_git
|
101
|
-
- name: Integration tests
|
102
|
-
dependencies:
|
103
|
-
- Validation
|
104
|
-
task:
|
105
|
-
prologue:
|
106
|
-
commands:
|
107
|
-
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-diagnose-$(checksum Gemfile)
|
108
|
-
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile)
|
109
|
-
- ./support/bundler_wrapper install --jobs=3 --retry=3
|
110
|
-
- ./support/bundler_wrapper exec rake extension:install
|
111
|
-
- "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'"
|
112
|
-
- "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
|
113
|
-
- git submodule init
|
114
|
-
- git submodule update
|
115
|
-
jobs:
|
116
|
-
- name: Diagnose
|
117
|
-
env_vars:
|
118
|
-
- name: RUBY_VERSION
|
119
|
-
value: 3.0.2
|
120
|
-
- name: LANGUAGE
|
121
|
-
value: ruby
|
122
|
-
commands:
|
123
|
-
- spec/integration/diagnose/bin/test
|
124
|
-
epilogue:
|
125
|
-
on_pass:
|
126
|
-
commands:
|
127
|
-
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-diagnose-$(checksum Gemfile) .bundle
|
128
|
-
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile) $HOME/.gem
|
39
|
+
validation:
|
40
|
+
name: "Validation of CI"
|
41
|
+
runs-on: ubuntu-latest
|
42
|
+
steps:
|
43
|
+
- uses: actions/checkout@v4
|
44
|
+
- uses: ruby/setup-ruby@v1
|
45
|
+
with:
|
46
|
+
ruby-version: "3.3"
|
47
|
+
bundler-cache: true
|
48
|
+
- run: rake build_matrix:github:validate
|
129
49
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) $HOME/.gem
|
50
|
+
integration_tests:
|
51
|
+
name: "Diagnose integration tests"
|
52
|
+
runs-on: ubuntu-latest
|
53
|
+
steps:
|
54
|
+
- uses: actions/checkout@v4
|
55
|
+
with:
|
56
|
+
submodules: true
|
57
|
+
- uses: ruby/setup-ruby@v1
|
58
|
+
with:
|
59
|
+
ruby-version: "3.3"
|
60
|
+
bundler-cache: true
|
61
|
+
- name: "Install gem extension"
|
62
|
+
run: rake extension:install
|
63
|
+
- name: "Bundle install"
|
64
|
+
run: bundle install
|
65
|
+
working-directory: "spec/integration/diagnose"
|
66
|
+
- name: "Run diagnose integration tests"
|
67
|
+
run: bundle exec rspec
|
68
|
+
working-directory: "spec/integration/diagnose"
|
69
|
+
env:
|
70
|
+
LANGUAGE: ruby
|
152
71
|
|
153
|
-
|
154
|
-
|
155
|
-
|
72
|
+
matrix:
|
73
|
+
env: # Shared for all jobs in the build matrix
|
74
|
+
RAILS_ENV: "test"
|
75
|
+
JRUBY_OPTS: ""
|
76
|
+
COV: "1"
|
156
77
|
|
157
78
|
gemsets: # By default all gems are tested
|
158
79
|
none:
|
@@ -165,12 +86,12 @@ matrix:
|
|
165
86
|
- "rails-7.1"
|
166
87
|
|
167
88
|
ruby:
|
168
|
-
- ruby: "2.7.8"
|
169
|
-
- ruby: "3.0.5"
|
170
|
-
- ruby: "3.1.3"
|
171
|
-
- ruby: "3.2.1"
|
172
89
|
- ruby: "3.3.1"
|
173
|
-
- ruby: "
|
90
|
+
- ruby: "3.2.1"
|
91
|
+
- ruby: "3.1.3"
|
92
|
+
- ruby: "3.0.5"
|
93
|
+
- ruby: "2.7.8"
|
94
|
+
- ruby: "jruby-9.4.7.0"
|
174
95
|
gems: "minimal"
|
175
96
|
gems:
|
176
97
|
- gem: "no_dependencies"
|
@@ -179,70 +100,77 @@ matrix:
|
|
179
100
|
- gem: "dry-monitor"
|
180
101
|
only:
|
181
102
|
ruby:
|
182
|
-
- "3.0.5"
|
183
|
-
- "3.1.3"
|
184
|
-
- "3.2.1"
|
185
103
|
- "3.3.1"
|
104
|
+
- "3.2.1"
|
105
|
+
- "3.1.3"
|
106
|
+
- "3.0.5"
|
186
107
|
- gem: "grape"
|
187
|
-
- gem: "hanami"
|
108
|
+
- gem: "hanami-2.0"
|
188
109
|
only:
|
189
110
|
ruby:
|
190
|
-
- "3.
|
191
|
-
- "3.1.3"
|
111
|
+
- "3.3.1"
|
192
112
|
- "3.2.1"
|
113
|
+
- "3.1.3"
|
114
|
+
- "3.0.5"
|
115
|
+
- gem: "hanami-2.1"
|
116
|
+
only:
|
117
|
+
ruby:
|
193
118
|
- "3.3.1"
|
119
|
+
- "3.2.1"
|
120
|
+
- "3.1.3"
|
121
|
+
- "3.0.5"
|
194
122
|
- gem: "http5"
|
195
123
|
- gem: "padrino"
|
196
124
|
- gem: "psych-3"
|
197
125
|
only:
|
198
126
|
ruby:
|
199
|
-
- "2.7.8"
|
200
|
-
- "3.0.5"
|
201
|
-
- "3.1.3"
|
202
|
-
- "3.2.1"
|
203
127
|
- "3.3.1"
|
128
|
+
- "3.2.1"
|
129
|
+
- "3.1.3"
|
130
|
+
- "3.0.5"
|
131
|
+
- "2.7.8"
|
204
132
|
- gem: "psych-4"
|
205
133
|
only:
|
206
134
|
ruby:
|
207
|
-
- "2.7.8"
|
208
|
-
- "3.0.5"
|
209
|
-
- "3.1.3"
|
210
|
-
- "3.2.1"
|
211
135
|
- "3.3.1"
|
136
|
+
- "3.2.1"
|
137
|
+
- "3.1.3"
|
138
|
+
- "3.0.5"
|
139
|
+
- "2.7.8"
|
212
140
|
- gem: "que"
|
213
141
|
- gem: "que_beta"
|
214
142
|
- gem: "rails-6.0"
|
215
143
|
only:
|
216
144
|
ruby:
|
217
|
-
- "2.7.8"
|
218
145
|
- "3.0.5"
|
219
|
-
- "
|
146
|
+
- "2.7.8"
|
147
|
+
- "jruby-9.4.7.0"
|
220
148
|
- gem: "rails-6.1"
|
221
149
|
only:
|
222
150
|
ruby:
|
223
|
-
- "2.7.8"
|
224
|
-
- "3.0.5"
|
225
|
-
- "3.1.3"
|
226
|
-
- "3.2.1"
|
227
151
|
- "3.3.1"
|
228
|
-
- "
|
152
|
+
- "3.2.1"
|
153
|
+
- "3.1.3"
|
154
|
+
- "3.0.5"
|
155
|
+
- "2.7.8"
|
156
|
+
- "jruby-9.4.7.0"
|
229
157
|
- gem: "rails-7.0"
|
230
158
|
only:
|
231
159
|
ruby:
|
232
|
-
- "2.7.8"
|
233
|
-
- "3.0.5"
|
234
|
-
- "3.1.3"
|
235
|
-
- "3.2.1"
|
236
160
|
- "3.3.1"
|
237
|
-
- "
|
161
|
+
- "3.2.1"
|
162
|
+
- "3.1.3"
|
163
|
+
- "3.0.5"
|
164
|
+
- "2.7.8"
|
165
|
+
- "jruby-9.4.7.0"
|
238
166
|
- gem: "rails-7.1"
|
239
167
|
only:
|
240
168
|
ruby:
|
241
|
-
- "3.0.5"
|
242
|
-
- "3.1.3"
|
243
|
-
- "3.2.1"
|
244
169
|
- "3.3.1"
|
245
|
-
- "
|
170
|
+
- "3.2.1"
|
171
|
+
- "3.1.3"
|
172
|
+
- "3.0.5"
|
173
|
+
- "jruby-9.4.7.0"
|
246
174
|
- gem: "sequel"
|
247
175
|
- gem: "sinatra"
|
248
176
|
- gem: "webmachine1"
|
data/ext/base.rb
CHANGED
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
require "rubygems/package"
|
9
9
|
require File.expand_path("../lib/appsignal/version.rb", __dir__)
|
10
10
|
require File.expand_path("../lib/appsignal/system.rb", __dir__)
|
11
|
-
require_relative "
|
11
|
+
require_relative "agent"
|
12
12
|
|
13
13
|
EXT_PATH = File.expand_path(__dir__).freeze
|
14
14
|
|
@@ -1,6 +1,7 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem
|
4
|
-
gem
|
3
|
+
gem "i18n", "~> 0.0" # Lock to pre 1.x version as it's not compatible
|
4
|
+
gem "webmachine", "~> 1.6"
|
5
|
+
gem "webrick"
|
5
6
|
|
6
|
-
gemspec :path =>
|
7
|
+
gemspec :path => "../"
|
data/lib/appsignal/config.rb
CHANGED
@@ -23,6 +23,7 @@ module Appsignal
|
|
23
23
|
:enable_gvl_global_timer => true,
|
24
24
|
:enable_gvl_waiting_threads => true,
|
25
25
|
:enable_rails_error_reporter => true,
|
26
|
+
:enable_rake_performance_instrumentation => false,
|
26
27
|
:endpoint => "https://push.appsignal.com",
|
27
28
|
:files_world_accessible => true,
|
28
29
|
:filter_metadata => [],
|
@@ -83,6 +84,8 @@ module Appsignal
|
|
83
84
|
"APPSIGNAL_ENABLE_GVL_GLOBAL_TIMER" => :enable_gvl_global_timer,
|
84
85
|
"APPSIGNAL_ENABLE_GVL_WAITING_THREADS" => :enable_gvl_waiting_threads,
|
85
86
|
"APPSIGNAL_ENABLE_RAILS_ERROR_REPORTER" => :enable_rails_error_reporter,
|
87
|
+
"APPSIGNAL_ENABLE_RAKE_PERFORMANCE_INSTRUMENTATION" =>
|
88
|
+
:enable_rake_performance_instrumentation,
|
86
89
|
"APPSIGNAL_FILES_WORLD_ACCESSIBLE" => :files_world_accessible,
|
87
90
|
"APPSIGNAL_FILTER_METADATA" => :filter_metadata,
|
88
91
|
"APPSIGNAL_FILTER_PARAMETERS" => :filter_parameters,
|
@@ -150,6 +153,7 @@ module Appsignal
|
|
150
153
|
APPSIGNAL_ENABLE_GVL_GLOBAL_TIMER
|
151
154
|
APPSIGNAL_ENABLE_GVL_WAITING_THREADS
|
152
155
|
APPSIGNAL_ENABLE_RAILS_ERROR_REPORTER
|
156
|
+
APPSIGNAL_ENABLE_RAKE_PERFORMANCE_INSTRUMENTATION
|
153
157
|
APPSIGNAL_FILES_WORLD_ACCESSIBLE
|
154
158
|
APPSIGNAL_INSTRUMENT_HTTP_RB
|
155
159
|
APPSIGNAL_INSTRUMENT_NET_HTTP
|
@@ -233,7 +237,7 @@ module Appsignal
|
|
233
237
|
# variables config.
|
234
238
|
# @param logger [Logger] The logger to use for the AppSignal gem. This is
|
235
239
|
# used by the configuration class only. Default:
|
236
|
-
# {Appsignal.internal_logger}. See also {Appsignal.
|
240
|
+
# {Appsignal.internal_logger}. See also {Appsignal.start}.
|
237
241
|
# @param config_file [String] Custom config file location. Default
|
238
242
|
# `config/appsignal.yml`.
|
239
243
|
#
|
data/lib/appsignal/demo.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
module Appsignal
|
4
4
|
# @api private
|
5
5
|
class Environment
|
6
|
+
ERROR_ON_YIELD = :APPSIGNAL_ERROR_ON_YIELD
|
7
|
+
|
6
8
|
# Add environment metadata.
|
7
9
|
#
|
8
10
|
# The key and value of the environment metadata must be a String, even if
|
@@ -46,9 +48,11 @@ module Appsignal
|
|
46
48
|
Appsignal.internal_logger.error \
|
47
49
|
"Unable to report on environment metadata #{key.inspect}:\n" \
|
48
50
|
"#{e.class}: #{e}"
|
49
|
-
|
51
|
+
ERROR_ON_YIELD
|
50
52
|
end
|
51
53
|
|
54
|
+
return if yielded_value == ERROR_ON_YIELD
|
55
|
+
|
52
56
|
value =
|
53
57
|
case yielded_value
|
54
58
|
when TrueClass, FalseClass
|
@@ -117,7 +121,12 @@ module Appsignal
|
|
117
121
|
def self.report_supported_gems
|
118
122
|
return unless defined?(Bundler) # Do nothing if Bundler is not present
|
119
123
|
|
120
|
-
bundle_gem_specs =
|
124
|
+
bundle_gem_specs =
|
125
|
+
if ::Bundler.rubygems.respond_to?(:installed_specs)
|
126
|
+
::Bundler.rubygems.installed_specs
|
127
|
+
else
|
128
|
+
::Bundler.rubygems.all_specs
|
129
|
+
end
|
121
130
|
SUPPORTED_GEMS.each do |gem_name|
|
122
131
|
gem_spec = bundle_gem_specs.find { |spec| spec.name == gem_name }
|
123
132
|
next unless gem_spec
|