appsignal 5.0.0.rc.1-java → 5.0.0.rc.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +140 -0
  3. data/README.md +2 -1
  4. data/Rakefile +110 -6
  5. data/appsignal.gemspec +7 -0
  6. data/build_matrix.yml +7 -2
  7. data/ext/agent.rb +27 -27
  8. data/lib/appsignal/cli/demo.rb +5 -0
  9. data/lib/appsignal/cli/diagnose.rb +8 -48
  10. data/lib/appsignal/cli/helpers.rb +45 -0
  11. data/lib/appsignal/config.rb +262 -37
  12. data/lib/appsignal/demo.rb +11 -9
  13. data/lib/appsignal/helpers/instrumentation.rb +88 -0
  14. data/lib/appsignal/hooks/action_cable.rb +8 -2
  15. data/lib/appsignal/hooks/active_job.rb +189 -1
  16. data/lib/appsignal/integrations/delayed_job_plugin.rb +172 -32
  17. data/lib/appsignal/integrations/que.rb +41 -9
  18. data/lib/appsignal/integrations/railtie.rb +4 -2
  19. data/lib/appsignal/integrations/resque.rb +26 -3
  20. data/lib/appsignal/integrations/shoryuken.rb +21 -2
  21. data/lib/appsignal/integrations/sidekiq.rb +23 -2
  22. data/lib/appsignal/integrations/webmachine.rb +13 -5
  23. data/lib/appsignal/opentelemetry/http_server_request.rb +35 -1
  24. data/lib/appsignal/opentelemetry/proxied_exporter.rb +83 -0
  25. data/lib/appsignal/opentelemetry.rb +182 -24
  26. data/lib/appsignal/rack/abstract_middleware.rb +4 -1
  27. data/lib/appsignal/rack/event_handler.rb +9 -2
  28. data/lib/appsignal/rack/grape_middleware.rb +37 -7
  29. data/lib/appsignal/rack.rb +29 -1
  30. data/lib/appsignal/transaction/base_backend.rb +21 -0
  31. data/lib/appsignal/transaction/extension_backend.rb +26 -0
  32. data/lib/appsignal/transaction/opentelemetry_backend.rb +90 -39
  33. data/lib/appsignal/transaction.rb +189 -32
  34. data/lib/appsignal/utils/request_headers.rb +78 -0
  35. data/lib/appsignal/utils.rb +1 -0
  36. data/lib/appsignal/version.rb +1 -1
  37. data/lib/appsignal.rb +1 -0
  38. data/sig/appsignal.rbi +205 -1
  39. data/sig/appsignal.rbs +196 -0
  40. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77d0e22fb5459d6180f21e04d33c74b67fccf48bd536f9d421f2360803336edd
4
- data.tar.gz: 4080ad48951daa435a0798951a5f36d98e62fe3b9cc62a0a94b04043e0b02b23
3
+ metadata.gz: e3a70ad079679d8959c30195df0b4d07920ea7ff163e5e87934a43657b65a5bb
4
+ data.tar.gz: befaa60b9fce62fa9bdc523658c00a1efc443433e4030e75b20e4942943d56ba
5
5
  SHA512:
6
- metadata.gz: 3dcc132106477e0181cff58f8bbed8ed1db7d6c3cebb81dac5b2cc9fc1a8e8b96cfcaf768bf1bfc4fff9c2529ddf6aa920ac30b9fc8367c7687f477f948ab048
7
- data.tar.gz: e053bcbe1bb2ec6ad4e09efb80cbd86593ab9342acfe16bda373f596bc96e507920a611cff9802fd46a8219851feaf909a59b2e35b5d9e7bce60c4f2eb1716e2
6
+ metadata.gz: 83d3a373f55595ec84255891636936c36f551ab8fb399813644668e6ca3a85f3c17bec08a11d111834a0b6dbd64254e48f30c3ec4b51745554a13f0cb5fea98f
7
+ data.tar.gz: fedde38472a0c09242eefc5a4bbd7250d7efaae543bdac31265f76275b1b42eb5b09b462d67ce29d7e4bd5f328e8a56158b7b067487f203cd4758d4516024a07
data/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 5.0.0.rc.2
4
+
5
+ _Published on 2026-09-23._
6
+
7
+ ### Added
8
+
9
+ - Detect the revision that is being deployed from the environment variables set by Heroku, Render, Kamal and Scalingo: `HEROKU_SLUG_COMMIT`, `RENDER_GIT_COMMIT`, `KAMAL_VERSION` and `CONTAINER_VERSION`. Applications deployed on those platforms now report their revision without setting the `revision` configuration option.
10
+
11
+ This affects collector mode, where deploys were reported as `unknown` when the revision was not configured.
12
+
13
+ (patch [bf606432](https://github.com/appsignal/appsignal-ruby/commit/bf606432aab96d3f9b3a20cbb4b0c48aa7748702))
14
+ - Detect the hostname of the machine the application runs on. On Heroku this is the name of the dyno, and everywhere else it is the name the host reports for itself. Set the `hostname` configuration option to report a different name.
15
+
16
+ This affects collector mode, where all data was reported for a host named `unknown` when the hostname was not configured.
17
+
18
+ (patch [bf606432](https://github.com/appsignal/appsignal-ruby/commit/bf606432aab96d3f9b3a20cbb4b0c48aa7748702))
19
+ - Report the host, the port and the HTTP version of an incoming web request in collector mode. These are sent as the `server.address`, `server.port` and `network.protocol.version` OpenTelemetry attributes. The host is read from the `Forwarded` and `X-Forwarded-Host` headers when a proxy sets them, so it is the host the client used rather than the one the proxy connected to. (patch [85460ff3](https://github.com/appsignal/appsignal-ruby/commit/85460ff3d8ae5235515fe291b9a6baea6ad0c47c))
20
+ - Report the request environment in collector mode. The `request_headers` configuration option is an allowlist of Rack environment names, and some of those names are not request headers. Those values are now reported as `appsignal.environment.*` OpenTelemetry attributes and shown in the request's Environment panel, instead of being left out.
21
+
22
+ Values that describe the request itself are not repeated there, because they are already reported as the request's method, path, host, port and protocol version.
23
+
24
+ (patch [85460ff3](https://github.com/appsignal/appsignal-ruby/commit/85460ff3d8ae5235515fe291b9a6baea6ad0c47c))
25
+ - Add the `keep_request_headers` and `keep_request_environment` configuration options, which are used in collector mode. They replace `request_headers`, which is deprecated in collector mode.
26
+
27
+ `keep_request_headers` lists the request headers to report, using the names OpenTelemetry uses for them, such as `accept` and `content-length`. `keep_request_environment` lists the Rack environment values to report that are not request headers, using the names Rack uses for them, such as `REMOTE_ADDR`.
28
+
29
+ Both options default to a value derived from `request_headers`, which lists Rack environment keys and mixes the two kinds together. So an application that only ever set `request_headers` keeps reporting the same values when it moves to collector mode.
30
+
31
+ The `request_headers` configuration option is deprecated in collector mode, and a warning will be emitted at startup, containing the values of `keep_request_headers` and `keep_request_environment` that should be used to replace it.
32
+
33
+ In agent mode, `request_headers` still lists every Rack environment key to report, and the two new options have no effect.
34
+
35
+ (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
36
+ - Add the `Appsignal.add_request_headers` and `Appsignal.add_request_environment` helpers.
37
+
38
+ Use `add_request_headers` to report request headers, naming each header in lowercase and with dashes, such as `content-length`. Use `add_request_environment` to report the values a Rack environment holds that are not request headers, naming each one the way Rack names it, such as `REMOTE_ADDR`.
39
+
40
+ In agent mode, both write to the "Environment" sample data, formatted as Rack environment keys. In collector mode, they write different span attributes.
41
+
42
+ Together they replace `Appsignal.add_headers`, which is now deprecated, as it accepts Rack environment keys and works out which ones are headers.
43
+
44
+ (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
45
+ - Report request headers for Webmachine applications. (patch [fcfb7a0d](https://github.com/appsignal/appsignal-ruby/commit/fcfb7a0d2545a2144aa61efa61d445c0e11c7749), [b47f5bd2](https://github.com/appsignal/appsignal-ruby/commit/b47f5bd2b4611f5a6089bff28f91d47eac94422f), [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
46
+
47
+ ### Changed
48
+
49
+ - Report `app` instead of `unknown` as the OpenTelemetry service name when the `service_name` configuration option is not set and collector mode is in use. (patch [7078181c](https://github.com/appsignal/appsignal-ruby/commit/7078181ccfc5aa5bb1200d99aa7c612c5acbbd00))
50
+ - The `filter_parameters` and `send_params` configuration options are deprecated in collector mode. Use `filter_request_payload`, `filter_function_parameters` and `filter_request_query_parameters` to filter different kinds of parameters, and `send_request_payload`, `send_request_query_parameters` and `send_function_parameters` to choose which kinds of parameters to report.
51
+
52
+ In collector mode, each kind of parameter is now filtered and reported according to its own options, and the deprecated options' values are only used to fill in values when the new options are unset. AppSignal logs which values to set to keep reporting what it reports now.
53
+
54
+ In agent mode, `filter_parameters` and `send_params` still apply to every kind of parameter, and the new options have no effect.
55
+
56
+ (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
57
+
58
+ ### Fixed
59
+
60
+ - The `ignore_logs` option now filters out the log lines that match its patterns in collector mode. (patch [bf606432](https://github.com/appsignal/appsignal-ruby/commit/bf606432aab96d3f9b3a20cbb4b0c48aa7748702))
61
+ - In collector mode, backtrace lines from your own application are now shown as paths relative to your application's root, and are recognized as your application's code. (patch [bf606432](https://github.com/appsignal/appsignal-ruby/commit/bf606432aab96d3f9b3a20cbb4b0c48aa7748702))
62
+ - The `ca_file_path` and `http_proxy` options now apply to the data sent to the collector in collector mode. Before this change they only applied to the data sent by the agent, so a custom certificate authority file or a proxy had no effect in collector mode. (patch [e99c6b68](https://github.com/appsignal/appsignal-ruby/commit/e99c6b689b20fb433ecdcdc9fb8c6173e1ea8cda))
63
+ - Remove an incorrect warning about the `filter_metadata` configuration option being ignored in collector mode. (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
64
+ - Report request headers in collector mode. (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
65
+ - Report no response headers in collector mode until the `response_headers` configuration option names some. The option had no effect at all, so every response header captured by the application's own OpenTelemetry instrumentation was reported whatever the option said. (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
66
+ - Read an array configuration option written as a null in `config/appsignal.yml` as the empty list it means. Options such as `filter_parameters` and `ignore_actions` raised a `NoMethodError` when AppSignal started, and `filter_metadata` and `filter_session_data` raised one while a transaction was sampled. (patch [992a60c8](https://github.com/appsignal/appsignal-ruby/commit/992a60c8d0f68b3edcb00150a1e9f14985619a4f))
67
+
3
68
  ## 5.0.0.rc.1
4
69
 
5
70
  _Published on 2026-08-21._
@@ -19,6 +84,81 @@ _Published on 2026-08-21._
19
84
 
20
85
  (minor [84d83b65](https://github.com/appsignal/appsignal-ruby/commit/84d83b657d65a93859ba73f295216a3b0ee9cab1), [90768626](https://github.com/appsignal/appsignal-ruby/commit/9076862677444c7772e6f8fbe1e3d5a646a4849d))
21
86
 
87
+ ## 4.10.4
88
+
89
+ _Published on 2026-09-22._
90
+
91
+ ### Fixed
92
+
93
+ - Start AppSignal before the Rails application's initializers run. Depending on
94
+ the order in which gems were loaded, AppSignal could start after
95
+ `config/initializers`. In those applications `Appsignal.active?` returned
96
+ `false` inside an initializer, errors raised by initializers were not reported,
97
+ and with `config.appsignal.start_at = :after_initialize` the Rails defaults for
98
+ `log_path` and `ignore_actions` were not applied.
99
+
100
+ (patch [523d8458](https://github.com/appsignal/appsignal-ruby/commit/523d845879cfe8cc6306bdc24d51f88ad979f714))
101
+
102
+ ## 4.10.3
103
+
104
+ _Published on 2026-09-10._
105
+
106
+ ### Fixed
107
+
108
+ - Fix the sanitization of function arguments in SQL statements.
109
+
110
+ Before this release, SQL sanitization of function arguments stripped out parts of the SQL statement after the function argument list.
111
+
112
+ (patch [74f509b0](https://github.com/appsignal/appsignal-ruby/commit/74f509b0e8438140bab79a5189c2ed421bbbdf6d))
113
+
114
+ ## 4.10.2
115
+
116
+ _Published on 2026-09-09._
117
+
118
+ ### Added
119
+
120
+ - Add support for Grape 4. On Grape 4, every request through a Grape API raised a `NoMethodError`. Applications on Grape 3 and below were not affected.
121
+
122
+ On Grape 4, the action name and the reported path now describe the endpoint's full route, so they include the API prefix, the path version and the mount point. They also no longer end in a trailing slash when the endpoint declares no path of its own, so an endpoint reported as `GET::My::Api#/users/:id/` is now reported as `GET::My::Api#/users/:id`. Action names on Grape 3 and below do not change.
123
+
124
+ (patch [bdea5c1b](https://github.com/appsignal/appsignal-ruby/commit/bdea5c1b6f02c902d0ba195eff3544545bee2547))
125
+
126
+ ### Changed
127
+
128
+ - Update the agent to handle high traffic apps. On high-traffic apps that would exceed the maximum accepted internal payload size, send data to the Push API more frequently. (patch [a1c3033e](https://github.com/appsignal/appsignal-ruby/commit/a1c3033e1b255371a2d71d4519506a67dbfa2b82))
129
+
130
+ ### Fixed
131
+
132
+ - Load the host Rails application before the `appsignal demo` command reads the
133
+ AppSignal configuration. This matches the behavior of `appsignal diagnose`.
134
+
135
+ Thanks [@Guflly](https://github.com/Guflly) for your contribution!
136
+
137
+ (patch [3249a376](https://github.com/appsignal/appsignal-ruby/commit/3249a376a6fb7a10c990e0f49f7907dc40b03a12))
138
+ - Fix events showing as unknown in long-running applications. An application process that kept running for thirty days without restarting could lose the names and queries of the events it recorded, both in slow traces and in the "Slow events" panel. (patch [a1c3033e](https://github.com/appsignal/appsignal-ruby/commit/a1c3033e1b255371a2d71d4519506a67dbfa2b82))
139
+ - Prevent `gc` events from appearing in the "Slow events" panel. (patch [a1c3033e](https://github.com/appsignal/appsignal-ruby/commit/a1c3033e1b255371a2d71d4519506a67dbfa2b82))
140
+ - Report Delayed Job jobs that fail to load. Before this change, a job whose
141
+ payload could not be deserialized was not reported to AppSignal at all.
142
+
143
+ This can happen when a deploy removes or renames a job class while jobs of that
144
+ class are still queued. Those jobs are now reported as failed, with the
145
+ `Delayed::DeserializationError` they raised, and are named after the class
146
+ recorded in the job's handler. When even that cannot be read, they are named
147
+ `DelayedJobInternal`.
148
+
149
+ (patch [ea294440](https://github.com/appsignal/appsignal-ruby/commit/ea29444069ef78347ad1e8266869b7d9aa2caa50))
150
+ - Record a single event for a bulk enqueue of Active Job jobs. Before this change,
151
+ enqueuing jobs with `ActiveJob.perform_all_later` would record an event for the
152
+ batch and, if the adapter was instrumented with AppSignal, another event for each
153
+ job in it. A job that slices a large collection and enqueues it in batches was
154
+ therefore reported with an event per job enqueued, where before version 4.9.0 it
155
+ had one event per batch.
156
+
157
+ A bulk enqueue is now recorded as a single `enqueue_all.active_job` event, named
158
+ after the job class when every job in the batch shares one.
159
+
160
+ (patch [fe82dc60](https://github.com/appsignal/appsignal-ruby/commit/fe82dc60bc8b52d466c0c9b673adbae29f79449e))
161
+
22
162
  ## 4.10.1
23
163
 
24
164
  _Published on 2026-08-20._
data/README.md CHANGED
@@ -240,7 +240,8 @@ configurations you need to run the spec suite with a specific Gemfile.
240
240
  BUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec
241
241
  BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
242
242
  BUNDLE_GEMFILE=gemfiles/dry-monitor.gemfile bundle exec rspec
243
- BUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec
243
+ BUNDLE_GEMFILE=gemfiles/grape-3.gemfile bundle exec rspec
244
+ BUNDLE_GEMFILE=gemfiles/grape-4.gemfile bundle exec rspec
244
245
  BUNDLE_GEMFILE=gemfiles/hanami.gemfile bundle exec rspec
245
246
  BUNDLE_GEMFILE=gemfiles/http5.gemfile bundle exec rspec
246
247
  BUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec
data/Rakefile CHANGED
@@ -20,6 +20,8 @@ VERSION_MANAGERS = {
20
20
  }
21
21
  }.freeze
22
22
 
23
+ SPEC_COVERAGE_AUDIT_JOB_NAME = "Spec coverage audit"
24
+
23
25
  def build_job(ruby_version, ruby_gem: nil, runs_on: DEFAULT_RUNS_ON)
24
26
  name = "Ruby #{ruby_version}"
25
27
  name = "#{name} - #{ruby_gem}" if ruby_gem
@@ -57,6 +59,89 @@ def build_job(ruby_version, ruby_gem: nil, runs_on: DEFAULT_RUNS_ON)
57
59
  }
58
60
  end
59
61
 
62
+ # Every test job uploads the example list its run wrote, named after the job so
63
+ # the audit can say which combination is missing one. Uploaded even when the run
64
+ # fails, because the list is written either way and the audit needs to tell a
65
+ # crashed job apart from a combination that legitimately runs nothing.
66
+ def example_list_upload_step(key)
67
+ {
68
+ "name" => "Upload example list",
69
+ "if" => "always()",
70
+ "uses" => "actions/upload-artifact@v4",
71
+ "with" => {
72
+ "name" => key,
73
+ "path" => "tmp/examples-*.json",
74
+ "if-no-files-found" => "error",
75
+ "retention-days" => 1
76
+ }
77
+ }
78
+ end
79
+
80
+ # Compares the examples defined in the source against the union of every job's
81
+ # example list.
82
+ #
83
+ # It cannot wait for the test jobs through `needs`. Naming all 426 of them puts
84
+ # the workflow over a limit on how many dependency edges GitHub accepts, and
85
+ # GitHub then refuses to create the run without reporting anything: no run
86
+ # appears, the pull request shows no checks, and the runs API stays empty.
87
+ # Grouping the dependencies behind intermediate jobs does not help, because the
88
+ # same number of edges still has to exist. So this job starts with the others
89
+ # and waits by polling the run it belongs to.
90
+ def spec_coverage_audit_job
91
+ {
92
+ "name" => SPEC_COVERAGE_AUDIT_JOB_NAME,
93
+ "needs" => "validation",
94
+ "runs-on" => DEFAULT_RUNS_ON,
95
+ # Reports without failing the build. The examples it currently finds are
96
+ # covered by separate work; removing this line is what makes it enforcing.
97
+ "continue-on-error" => true,
98
+ # Long enough for the whole matrix, and short enough that a stuck job does
99
+ # not hold a runner for the six hours GitHub would otherwise allow.
100
+ "timeout-minutes" => 180,
101
+ "permissions" => {
102
+ "actions" => "read",
103
+ "contents" => "read"
104
+ },
105
+ "steps" => [
106
+ {
107
+ "name" => "Check out repository",
108
+ "uses" => "actions/checkout@v4"
109
+ },
110
+ {
111
+ "name" => "Install Ruby",
112
+ "uses" => "ruby/setup-ruby@v1",
113
+ "with" => { "ruby-version" => "3.4" }
114
+ },
115
+ {
116
+ "name" => "Wait for the test jobs to upload their example lists",
117
+ "env" => { "GH_TOKEN" => "${{ secrets.GITHUB_TOKEN }}" },
118
+ "run" => <<~SHELL
119
+ jobs="repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs"
120
+ filter='.jobs[]
121
+ | select(.name != "#{SPEC_COVERAGE_AUDIT_JOB_NAME}")
122
+ | select(.status != "completed")
123
+ | .name'
124
+ while :; do
125
+ pending=$(gh api --paginate "$jobs?per_page=100" --jq "$filter" | wc -l)
126
+ if [ "$pending" -eq 0 ]; then break; fi
127
+ echo "Waiting for $pending jobs."
128
+ sleep 60
129
+ done
130
+ SHELL
131
+ },
132
+ {
133
+ "name" => "Download example lists",
134
+ "uses" => "actions/download-artifact@v4",
135
+ "with" => { "path" => "artifacts" }
136
+ },
137
+ {
138
+ "name" => "Audit spec coverage",
139
+ "run" => "ruby script/audit_spec_coverage.rb artifacts"
140
+ }
141
+ ]
142
+ }
143
+ end
144
+
60
145
  def build_matrix_key(ruby_version, ruby_gem: nil, runs_on: DEFAULT_RUNS_ON)
61
146
  base = "ruby_#{ruby_version}"
62
147
  base = "#{base}__#{ruby_gem}" if ruby_gem
@@ -150,11 +235,14 @@ namespace :build_matrix do
150
235
  "name" => "Run tests without extension",
151
236
  "run" => "./script/bundler_wrapper exec rake test:failure"
152
237
  }
238
+ job["steps"] << example_list_upload_step(build_matrix_key(ruby["ruby"]))
153
239
  builds[build_matrix_key(ruby["ruby"])] = job
154
240
  else
155
241
  job["needs"] = build_matrix_key(ruby["ruby"])
156
242
  job["steps"] << test_step
157
- builds[build_matrix_key(ruby["ruby"], :ruby_gem => ruby_gem["gem"])] = job
243
+ gem_key = build_matrix_key(ruby["ruby"], :ruby_gem => ruby_gem["gem"])
244
+ job["steps"] << example_list_upload_step(gem_key)
245
+ builds[gem_key] = job
158
246
  end
159
247
 
160
248
  # On collector-capable Rubies, additionally run the gem's
@@ -169,8 +257,9 @@ namespace :build_matrix do
169
257
  .merge("BUNDLE_GEMFILE" => "gemfiles/#{collector_gem}.gemfile")
170
258
  collector_job["needs"] = build_matrix_key(ruby["ruby"])
171
259
  collector_job["steps"] << test_step
172
- builds[build_matrix_key(ruby["ruby"], :ruby_gem => collector_gem)] =
173
- collector_job
260
+ collector_key = build_matrix_key(ruby["ruby"], :ruby_gem => collector_gem)
261
+ collector_job["steps"] << example_list_upload_step(collector_key)
262
+ builds[collector_key] = collector_job
174
263
  end
175
264
 
176
265
  # Add build for macOS
@@ -188,9 +277,13 @@ namespace :build_matrix do
188
277
  "name" => "Run tests without extension",
189
278
  "run" => "./script/bundler_wrapper exec rake test:failure"
190
279
  }
191
- builds[build_matrix_key(ruby["ruby"], :runs_on => runs_on)] = job
280
+ macos_key = build_matrix_key(ruby["ruby"], :runs_on => runs_on)
281
+ job["steps"] << example_list_upload_step(macos_key)
282
+ builds[macos_key] = job
192
283
  end
193
284
 
285
+ builds["spec_coverage_audit"] = spec_coverage_audit_job
286
+
194
287
  github["jobs"] = github["jobs"].merge(builds)
195
288
 
196
289
  job_count = github["jobs"].count
@@ -448,14 +541,25 @@ begin
448
541
  excludes << "spec/lib/appsignal/extension/jruby_spec.rb" unless is_jruby
449
542
  exclude_pattern = "--exclude-pattern=#{excludes.join(",")}" if excludes.any?
450
543
 
544
+ # Written alongside the human-readable output so the coverage audit can tell
545
+ # which examples this Ruby and gemfile combination actually ran. Every CI job
546
+ # uploads its list. Nothing else reveals that a dependency guard is false in
547
+ # every combination, because a guarded example is then never defined at all.
548
+ def example_list_opts(name)
549
+ "--format json --out tmp/examples-#{name}.json"
550
+ end
551
+
451
552
  desc "Run the AppSignal gem test suite."
452
553
  RSpec::Core::RakeTask.new :test do |t|
453
- t.rspec_opts = "#{exclude_pattern} --format documentation"
554
+ t.rspec_opts = "#{exclude_pattern} --format documentation " \
555
+ "#{example_list_opts("test")}"
454
556
  end
455
557
 
456
558
  namespace :test do
457
559
  RSpec::Core::RakeTask.new :rspec_failure do |t|
458
- t.rspec_opts = "#{exclude_pattern} --tag extension_installation_failure"
560
+ t.rspec_opts = "#{exclude_pattern} --format documentation " \
561
+ "--tag extension_installation_failure " \
562
+ "#{example_list_opts("failure")}"
459
563
  end
460
564
 
461
565
  desc "Intentionally fail the extension installation"
data/appsignal.gemspec CHANGED
@@ -69,6 +69,13 @@ Gem::Specification.new do |gem|
69
69
  # enforced at boot by `Appsignal::OpenTelemetry.configure`.
70
70
 
71
71
  gem.add_development_dependency "pry"
72
+ # Reached through webmock's addressable. Version 7 requires Ruby 3.2 and
73
+ # version 6 requires 3.0, so an older Ruby cannot resolve the development
74
+ # dependencies unless this is held back. The cop guards the requirements of
75
+ # the released gem, which a development dependency is not part of.
76
+ # rubocop:disable Gemspec/RubyVersionGlobalsUsage
77
+ gem.add_development_dependency "public_suffix", "< 6" if RUBY_VERSION < "3.2"
78
+ # rubocop:enable Gemspec/RubyVersionGlobalsUsage
72
79
  gem.add_development_dependency "rake", ">= 12"
73
80
  gem.add_development_dependency "rspec", "~> 3.8"
74
81
  gem.add_development_dependency "rubocop", "~> 1.87.0"
data/build_matrix.yml CHANGED
@@ -174,7 +174,13 @@ matrix:
174
174
  - "3.2.5"
175
175
  - "3.1.6"
176
176
  - "3.0.7"
177
- - gem: "grape"
177
+ - gem: "grape-3"
178
+ - gem: "grape-4"
179
+ only:
180
+ ruby:
181
+ - "4.0.0"
182
+ - "3.4.1"
183
+ - "3.3.4"
178
184
  - gem: "hanami-2.0"
179
185
  only:
180
186
  ruby:
@@ -293,7 +299,6 @@ matrix:
293
299
  - "3.4.1"
294
300
  - "3.3.4"
295
301
  - "3.2.5"
296
- - gem: "mongo"
297
302
  - gem: "resque-2"
298
303
  - gem: "resque-3"
299
304
  only:
data/ext/agent.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # Modifications to this file will be overwritten with the next agent release.
7
7
 
8
8
  APPSIGNAL_AGENT_CONFIG = {
9
- "version" => "0.36.12",
9
+ "version" => "0.37.1",
10
10
  "mirrors" => [
11
11
  "https://d135dj0rjqvssy.cloudfront.net",
12
12
  "https://appsignal-agent-releases.global.ssl.fastly.net"
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
14
14
  "triples" => {
15
15
  "x86_64-darwin" => {
16
16
  "static" => {
17
- "checksum" => "a63189a2ba6b500e038e5658f97478ceae27a956baa2f89a4e79ee5a1dadace6",
17
+ "checksum" => "a29834f6a305a0baedbf5bd3f25c28feca45b3a175029d655ece7224515c206a",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "ecfb108dcc4d10f442415debaceed6d2e568b44ab938cf0ed6fee3ccfbdc5379",
21
+ "checksum" => "7450ed4679d7ca425d7fb7563931a9ca73365ac03ac62ace1880d0a5de2fe06d",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "a63189a2ba6b500e038e5658f97478ceae27a956baa2f89a4e79ee5a1dadace6",
27
+ "checksum" => "a29834f6a305a0baedbf5bd3f25c28feca45b3a175029d655ece7224515c206a",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "ecfb108dcc4d10f442415debaceed6d2e568b44ab938cf0ed6fee3ccfbdc5379",
31
+ "checksum" => "7450ed4679d7ca425d7fb7563931a9ca73365ac03ac62ace1880d0a5de2fe06d",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
37
+ "checksum" => "53198c2f10fb56565ceece6632ec0cd38f30e7fef3df79094f11381f4b07f8a6",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
41
+ "checksum" => "18fd2861c72fdb1ed5261cad90667923d0b2299ebd3511114d10416ecbd9998c",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
47
+ "checksum" => "53198c2f10fb56565ceece6632ec0cd38f30e7fef3df79094f11381f4b07f8a6",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
51
+ "checksum" => "18fd2861c72fdb1ed5261cad90667923d0b2299ebd3511114d10416ecbd9998c",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
57
+ "checksum" => "53198c2f10fb56565ceece6632ec0cd38f30e7fef3df79094f11381f4b07f8a6",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
61
+ "checksum" => "18fd2861c72fdb1ed5261cad90667923d0b2299ebd3511114d10416ecbd9998c",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "0a277e682f1568fbc54df849a46f21f155643b40c285a5bd30294c9d046e49c2",
67
+ "checksum" => "64fc4b0b48d780eb6721421a4d2ef3e4b94ee763266ad5a2768acdf3d9feadd7",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "94e0193908955e7a3a274a37947e234c5b038aa26c0ea9b371a08fd63441a940",
71
+ "checksum" => "816c9b77f8782074fd04c71d094d6c8b6127ab3f501303cb80e22a31334b876c",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "0d4536a2b1c9b6915f0f8597bd858988e284e7dbc4a14488332ffa7e401a1134",
77
+ "checksum" => "ea6544e43502d0ec49a708343483244a5ec457ae4c89752a295b238c3e62440c",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "c5df66876e4611d5ef8798013f0188469cbdea6753a9b9d6cf54bd858e6331e9",
81
+ "checksum" => "8e40de0254d822f58610c00a047fdd34753d71c2c2f9c9e75afb228c4768857a",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "0d4536a2b1c9b6915f0f8597bd858988e284e7dbc4a14488332ffa7e401a1134",
87
+ "checksum" => "ea6544e43502d0ec49a708343483244a5ec457ae4c89752a295b238c3e62440c",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "c5df66876e4611d5ef8798013f0188469cbdea6753a9b9d6cf54bd858e6331e9",
91
+ "checksum" => "8e40de0254d822f58610c00a047fdd34753d71c2c2f9c9e75afb228c4768857a",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "eec59a3e46dd5d5baff044465b4e314f21edf6270500bf24e3bc50afcee5f2e2",
97
+ "checksum" => "bc04fc8691b8950d20776646117fd7a217a3267d4eac14b2c5f446ed8f9fcf99",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "37471e17c5cb9f252d039cfbc0c01d570698c2245f6c8783fd2778e640b59a54",
101
+ "checksum" => "fe86688bd2ea0ad5cf6df1c71d7b041c375e5192c572b4bac540c7c36576ba1a",
102
102
  "filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
103
103
  }
104
104
  },
105
105
  "x86_64-linux-musl" => {
106
106
  "static" => {
107
- "checksum" => "4454ec095ad14813bedea20a110a26235dbc6e8e33538219fad325792c0d888e",
107
+ "checksum" => "5cd6d3f106d6e34ad6558d5191241860345dfd3e0ad9daaa798c0781e17c142a",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "4c21039b077b0c292d530210e077d942694f4c533d3761ed11e27ca932215131",
111
+ "checksum" => "3fa17e5a1e325842f89f14ddfbc48dd7286724a765859c073475633726364f4e",
112
112
  "filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
113
113
  }
114
114
  },
115
115
  "aarch64-linux-musl" => {
116
116
  "static" => {
117
- "checksum" => "048a55f0f10087e7954559d6cd09b371a0b532673f7ca769bcfde5729e297a72",
117
+ "checksum" => "86c3c6356cac89c4030e427915c3aad7ea804278835bd4a5cc75ebbdd18f5dbd",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "8dc336cffcb2cffe85daa8c70b02b0af7e626ed81c8873cdbb627216a411d59a",
121
+ "checksum" => "66c5e30dad3f804261953c9a0ad7c15ef183163fe863894f524ea9bb34b6c9a0",
122
122
  "filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
123
123
  }
124
124
  },
125
125
  "x86_64-freebsd" => {
126
126
  "static" => {
127
- "checksum" => "d81d039a3c1936bd393a6140b46f48092da31600b0311eab819acd777521a588",
127
+ "checksum" => "0428134ff69b924900b4cda8d16b181870ef4eced5cb501e9ac2a952f9c52580",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "cc345d4a791200e5af53c533e7ad83d278e98ee0becb5b54e502ba8934094372",
131
+ "checksum" => "90869b3bfe783dfcccef58814d7cd8785161ad9b6b552fd2de9a43ce8bd2bae5",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "d81d039a3c1936bd393a6140b46f48092da31600b0311eab819acd777521a588",
137
+ "checksum" => "0428134ff69b924900b4cda8d16b181870ef4eced5cb501e9ac2a952f9c52580",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "cc345d4a791200e5af53c533e7ad83d278e98ee0becb5b54e502ba8934094372",
141
+ "checksum" => "90869b3bfe783dfcccef58814d7cd8785161ad9b6b552fd2de9a43ce8bd2bae5",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -40,6 +40,8 @@ module Appsignal
40
40
  # @see https://docs.appsignal.com/support/debugging.html
41
41
  # Debugging AppSignal guide
42
42
  class Demo
43
+ extend CLI::Helpers
44
+
43
45
  class << self
44
46
  # @param options [Hash]
45
47
  # @option options :environment [String] environment to load
@@ -47,6 +49,9 @@ module Appsignal
47
49
  # @return [void]
48
50
  def run(options = {})
49
51
  ENV["APPSIGNAL_APP_ENV"] = options[:environment] if options[:environment]
52
+ # Load the host Rails app, if any, so that the AppSignal config file
53
+ # can use the application when it is read.
54
+ require_rails_app_if_present(options[:environment])
50
55
 
51
56
  puts "Sending demonstration sample data..."
52
57
  if Appsignal::Demo.transmit