appsignal 3.13.2-java → 4.0.0.beta.1-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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +499 -488
  3. data/CHANGELOG.md +98 -15
  4. data/Rakefile +31 -7
  5. data/benchmark.rake +4 -6
  6. data/build_matrix.yml +46 -40
  7. data/ext/agent.rb +30 -30
  8. data/ext/appsignal_extension.c +25 -0
  9. data/gemfiles/grape.gemfile +1 -5
  10. data/gemfiles/rails-6.0.gemfile +0 -4
  11. data/gemfiles/rails-6.1.gemfile +0 -4
  12. data/gemfiles/rails-7.1.gemfile +1 -6
  13. data/gemfiles/rails-7.2.gemfile +11 -0
  14. data/lib/appsignal/check_in/cron.rb +2 -15
  15. data/lib/appsignal/cli/diagnose.rb +37 -28
  16. data/lib/appsignal/cli/install.rb +5 -1
  17. data/lib/appsignal/config.rb +57 -119
  18. data/lib/appsignal/demo.rb +2 -2
  19. data/lib/appsignal/extension/jruby.rb +14 -0
  20. data/lib/appsignal/helpers/instrumentation.rb +139 -417
  21. data/lib/appsignal/helpers/metrics.rb +0 -16
  22. data/lib/appsignal/hooks/action_cable.rb +8 -8
  23. data/lib/appsignal/hooks/active_job.rb +2 -2
  24. data/lib/appsignal/hooks/at_exit.rb +37 -0
  25. data/lib/appsignal/hooks.rb +1 -16
  26. data/lib/appsignal/integrations/action_cable.rb +2 -2
  27. data/lib/appsignal/integrations/capistrano/appsignal.cap +2 -4
  28. data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +1 -4
  29. data/lib/appsignal/integrations/delayed_job_plugin.rb +3 -3
  30. data/lib/appsignal/integrations/que.rb +2 -2
  31. data/lib/appsignal/integrations/railtie.rb +26 -59
  32. data/lib/appsignal/integrations/rake.rb +2 -2
  33. data/lib/appsignal/integrations/resque.rb +2 -2
  34. data/lib/appsignal/integrations/shoryuken.rb +4 -4
  35. data/lib/appsignal/integrations/sidekiq.rb +3 -3
  36. data/lib/appsignal/integrations/webmachine.rb +2 -2
  37. data/lib/appsignal/loaders.rb +1 -1
  38. data/lib/appsignal/probes.rb +0 -9
  39. data/lib/appsignal/rack/abstract_middleware.rb +4 -26
  40. data/lib/appsignal/rack/body_wrapper.rb +0 -12
  41. data/lib/appsignal/rack/event_handler.rb +4 -4
  42. data/lib/appsignal/rack/rails_instrumentation.rb +1 -1
  43. data/lib/appsignal/rack.rb +0 -25
  44. data/lib/appsignal/sample_data.rb +95 -0
  45. data/lib/appsignal/transaction.rb +235 -361
  46. data/lib/appsignal/utils/rails_helper.rb +4 -0
  47. data/lib/appsignal/version.rb +1 -1
  48. data/lib/appsignal.rb +19 -71
  49. data/spec/lib/appsignal/auth_check_spec.rb +1 -1
  50. data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
  51. data/spec/lib/appsignal/capistrano3_spec.rb +53 -13
  52. data/spec/lib/appsignal/check_in_spec.rb +1 -207
  53. data/spec/lib/appsignal/cli/demo_spec.rb +7 -27
  54. data/spec/lib/appsignal/cli/diagnose_spec.rb +148 -121
  55. data/spec/lib/appsignal/config_spec.rb +304 -379
  56. data/spec/lib/appsignal/extension_install_failure_spec.rb +5 -1
  57. data/spec/lib/appsignal/extension_spec.rb +5 -1
  58. data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +1 -1
  59. data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +1 -2
  60. data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +1 -0
  61. data/spec/lib/appsignal/hooks/activejob_spec.rb +7 -12
  62. data/spec/lib/appsignal/hooks/at_exit_spec.rb +72 -0
  63. data/spec/lib/appsignal/hooks/gvl_spec.rb +10 -5
  64. data/spec/lib/appsignal/hooks/http_spec.rb +3 -3
  65. data/spec/lib/appsignal/hooks/net_http_spec.rb +3 -3
  66. data/spec/lib/appsignal/hooks/rake_spec.rb +6 -9
  67. data/spec/lib/appsignal/hooks/redis_client_spec.rb +5 -10
  68. data/spec/lib/appsignal/hooks/redis_spec.rb +4 -7
  69. data/spec/lib/appsignal/hooks/resque_spec.rb +3 -5
  70. data/spec/lib/appsignal/hooks_spec.rb +0 -41
  71. data/spec/lib/appsignal/integrations/data_mapper_spec.rb +29 -20
  72. data/spec/lib/appsignal/integrations/delayed_job_plugin_spec.rb +4 -9
  73. data/spec/lib/appsignal/integrations/railtie_spec.rb +179 -157
  74. data/spec/lib/appsignal/integrations/shoryuken_spec.rb +3 -5
  75. data/spec/lib/appsignal/integrations/sidekiq_spec.rb +48 -62
  76. data/spec/lib/appsignal/loaders/hanami_spec.rb +6 -9
  77. data/spec/lib/appsignal/loaders/padrino_spec.rb +6 -10
  78. data/spec/lib/appsignal/loaders/sinatra_spec.rb +6 -9
  79. data/spec/lib/appsignal/loaders_spec.rb +8 -1
  80. data/spec/lib/appsignal/marker_spec.rb +1 -1
  81. data/spec/lib/appsignal/probes_spec.rb +4 -83
  82. data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +4 -63
  83. data/spec/lib/appsignal/rack/body_wrapper_spec.rb +0 -48
  84. data/spec/lib/appsignal/rack/event_handler_spec.rb +18 -15
  85. data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +3 -11
  86. data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +4 -5
  87. data/spec/lib/appsignal/sample_data_spec.rb +174 -0
  88. data/spec/lib/appsignal/transaction_spec.rb +791 -1031
  89. data/spec/lib/appsignal/transmitter_spec.rb +6 -8
  90. data/spec/lib/appsignal_spec.rb +294 -643
  91. data/spec/spec_helper.rb +1 -3
  92. data/spec/support/fixtures/projects/valid/config/appsignal.yml +4 -7
  93. data/spec/support/fixtures/projects/valid_with_rails_app/config/application.rb +16 -0
  94. data/spec/support/fixtures/projects/valid_with_rails_app/config/appsignal.yml +56 -0
  95. data/spec/support/fixtures/projects/valid_with_rails_app/config/environment.rb +5 -0
  96. data/spec/support/helpers/api_request_helper.rb +3 -2
  97. data/spec/support/helpers/config_helpers.rb +40 -10
  98. data/spec/support/helpers/dependency_helper.rb +8 -0
  99. data/spec/support/helpers/log_helpers.rb +1 -0
  100. data/spec/support/helpers/rails_helper.rb +6 -6
  101. data/spec/support/helpers/transaction_helpers.rb +2 -24
  102. data/spec/support/matchers/transaction.rb +3 -3
  103. data/spec/support/mocks/appsignal_mock.rb +3 -3
  104. data/spec/support/mocks/mock_probe.rb +2 -0
  105. data/spec/support/testing.rb +2 -2
  106. metadata +15 -22
  107. data/gemfiles/que_beta.gemfile +0 -5
  108. data/lib/appsignal/helpers/heartbeat.rb +0 -20
  109. data/lib/appsignal/integrations/grape.rb +0 -35
  110. data/lib/appsignal/integrations/hanami.rb +0 -13
  111. data/lib/appsignal/integrations/padrino.rb +0 -13
  112. data/lib/appsignal/integrations/sinatra.rb +0 -13
  113. data/lib/appsignal/rack/generic_instrumentation.rb +0 -22
  114. data/lib/appsignal/rack/streaming_listener.rb +0 -28
  115. data/spec/lib/appsignal/integrations/grape_spec.rb +0 -36
  116. data/spec/lib/appsignal/integrations/hanami_spec.rb +0 -17
  117. data/spec/lib/appsignal/integrations/padrino_spec.rb +0 -15
  118. data/spec/lib/appsignal/integrations/sinatra_spec.rb +0 -15
  119. data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +0 -81
  120. data/spec/lib/appsignal/rack/streaming_listener_spec.rb +0 -69
  121. data/spec/support/fixtures/projects/valid/config/environments/development.rb +0 -0
  122. data/spec/support/fixtures/projects/valid/config/environments/production.rb +0 -0
  123. data/spec/support/fixtures/projects/valid/config/environments/test.rb +0 -0
  124. data/spec/support/rails/my_app.rb +0 -6
  125. /data/spec/support/fixtures/projects/{valid/config/application.rb → valid_with_rails_app/log/.gitkeep} +0 -0
data/spec/spec_helper.rb CHANGED
@@ -25,9 +25,7 @@ Dir[File.join(APPSIGNAL_SPEC_DIR, "support/shared_examples", "*.rb")].sort.each
25
25
  require f
26
26
  end
27
27
  if DependencyHelper.rails_present?
28
- Dir[File.join(DirectoryHelper.support_dir, "rails", "*.rb")].sort.each do |f|
29
- require f
30
- end
28
+ require File.join(ConfigHelpers.rails_project_fixture_path, "config/application.rb")
31
29
  end
32
30
  if DependencyHelper.hanami2_present?
33
31
  Dir[File.join(DirectoryHelper.support_dir, "hanami", "*.rb")].sort.each do |f|
@@ -1,13 +1,6 @@
1
1
  default: &defaults
2
2
  push_api_key: "abc"
3
3
  name: "TestApp"
4
- request_headers: [
5
- "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",
6
- "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",
7
- "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE", "HTTP_REFERER",
8
- "REQUEST_METHOD", "REQUEST_PATH", "SERVER_NAME", "SERVER_PORT",
9
- "SERVER_PROTOCOL", "HTTP_USER_AGENT"
10
- ]
11
4
  enable_minutely_probes: false
12
5
 
13
6
  production:
@@ -58,3 +51,7 @@ rack_env:
58
51
 
59
52
  rails_env:
60
53
  <<: *defaults
54
+
55
+ inactive_env:
56
+ <<: *defaults
57
+ active: false
@@ -0,0 +1,16 @@
1
+ require "rails"
2
+
3
+ module MyApp
4
+ class Application < Rails::Application
5
+ config.active_support.deprecation = proc { |message, stack| }
6
+ config.eager_load = false
7
+
8
+ def self.initialize!
9
+ # Prevent errors about Rails being initialized more than once
10
+ return if defined?(@initialized)
11
+
12
+ super
13
+ @initialized = true
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,56 @@
1
+ default: &defaults
2
+ push_api_key: "abc"
3
+ name: "TestApp"
4
+ enable_minutely_probes: false
5
+
6
+ production:
7
+ <<: *defaults
8
+ active: true
9
+
10
+ development:
11
+ <<: *defaults
12
+ active: true
13
+
14
+ test:
15
+ <<: *defaults
16
+ log_level: debug
17
+ active: true
18
+
19
+ old_config:
20
+ api_key: "def"
21
+ active: true
22
+ ignore_exceptions:
23
+ - StandardError
24
+ request_headers: [
25
+ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",
26
+ "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",
27
+ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE", "HTTP_REFERER",
28
+ "REQUEST_METHOD", "REQUEST_PATH", "SERVER_NAME", "SERVER_PORT",
29
+ "SERVER_PROTOCOL", "HTTP_USER_AGENT"
30
+ ]
31
+
32
+ old_config_mixed_with_new_config:
33
+ push_api_key: "ghi"
34
+ api_key: "def"
35
+ active: true
36
+ ignore_errors:
37
+ - NoMethodError
38
+ ignore_exceptions:
39
+ - StandardError
40
+ request_headers: [
41
+ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",
42
+ "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",
43
+ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE", "HTTP_REFERER",
44
+ "REQUEST_METHOD", "REQUEST_PATH", "SERVER_NAME", "SERVER_PORT",
45
+ "SERVER_PROTOCOL", "HTTP_USER_AGENT"
46
+ ]
47
+
48
+ rack_env:
49
+ <<: *defaults
50
+
51
+ rails_env:
52
+ <<: *defaults
53
+
54
+ inactive_env:
55
+ <<: *defaults
56
+ active: false
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative "application"
3
+
4
+ # Initialize the Rails application.
5
+ MyApp::Application.initialize!
@@ -4,7 +4,7 @@ module ApiRequestHelper
4
4
  :query => {
5
5
  :api_key => config[:push_api_key],
6
6
  :name => config[:name],
7
- :environment => config.env,
7
+ :environment => config.respond_to?(:env) ? config.env : config[:environment],
8
8
  :hostname => config[:hostname],
9
9
  :gem_version => Appsignal::VERSION
10
10
  },
@@ -14,6 +14,7 @@ module ApiRequestHelper
14
14
  }
15
15
  body = Appsignal::Utils::JSON.generate(body) if body.is_a? Hash
16
16
  options[:body] = body if body
17
- stub_request(:post, "#{config[:endpoint]}/1/#{path}").with(options)
17
+ endpoint = config[:endpoint] || Appsignal::Config::DEFAULT_CONFIG[:endpoint]
18
+ stub_request(:post, "#{endpoint}/1/#{path}").with(options)
18
19
  end
19
20
  end
@@ -6,24 +6,54 @@ module ConfigHelpers
6
6
  end
7
7
  module_function :project_fixture_path
8
8
 
9
- def project_fixture_config( # rubocop:disable Metrics/ParameterLists
9
+ def rails_project_fixture_path
10
+ File.expand_path(
11
+ File.join(File.dirname(__FILE__), "../fixtures/projects/valid_with_rails_app")
12
+ )
13
+ end
14
+ module_function :rails_project_fixture_path
15
+
16
+ def project_fixture_config(
10
17
  env = "production",
11
- initial_config = {},
12
- logger = Appsignal.internal_logger,
13
- config_file = nil
18
+ options = {},
19
+ logger = Appsignal.internal_logger
14
20
  )
15
21
  Appsignal::Config.new(
16
22
  project_fixture_path,
17
23
  env,
18
- initial_config,
19
- logger,
20
- config_file
21
- )
24
+ logger
25
+ ).tap do |c|
26
+ c.merge_dsl_options(options)
27
+ c.validate
28
+ end
22
29
  end
23
30
  module_function :project_fixture_config
24
31
 
25
- def start_agent(env = "production")
26
- Appsignal._config = project_fixture_config(env)
32
+ def build_config(
33
+ root_path: project_fixture_path,
34
+ env: "production",
35
+ options: {},
36
+ logger: Appsignal.internal_logger
37
+ )
38
+ Appsignal::Config.new(
39
+ root_path,
40
+ env,
41
+ logger
42
+ ).tap do |c|
43
+ c.merge_dsl_options(options) if options.any?
44
+ c.validate
45
+ end
46
+ end
47
+ module_function :build_config
48
+
49
+ def start_agent(env: "production", options: {})
50
+ env = "production" if env == :default
51
+ env ||= "production"
52
+ Appsignal.configure(env, :root_path => project_fixture_path) do |config|
53
+ options.each do |option, value|
54
+ config.send("#{option}=", value)
55
+ end
56
+ end
27
57
  Appsignal.start
28
58
  end
29
59
 
@@ -1,6 +1,10 @@
1
1
  module DependencyHelper
2
2
  module_function
3
3
 
4
+ def macos?
5
+ RbConfig::CONFIG["host_os"].include?("darwin")
6
+ end
7
+
4
8
  def ruby_version
5
9
  Gem::Version.new(RUBY_VERSION)
6
10
  end
@@ -37,6 +41,10 @@ module DependencyHelper
37
41
  rails_present? && rails_version >= Gem::Version.new("7.0.0")
38
42
  end
39
43
 
44
+ def rails7_1_present?
45
+ rails_present? && rails_version >= Gem::Version.new("7.1.0")
46
+ end
47
+
40
48
  def active_job_wraps_args?
41
49
  rails7_present? || (ruby_3_1_or_newer? && rails6_1_present? && !rails6_1_5_present?)
42
50
  end
@@ -8,6 +8,7 @@ module LogHelpers
8
8
  def use_logger_with(log)
9
9
  Appsignal.internal_logger = test_logger(log)
10
10
  yield
11
+ ensure
11
12
  Appsignal.internal_logger = nil
12
13
  end
13
14
 
@@ -1,10 +1,10 @@
1
1
  module RailsHelper
2
- def with_railtie(app)
3
- clear_rails_error_reporter! if Rails.respond_to? :error
4
- Appsignal::Integrations::Railtie.initialize_appsignal(app)
5
- yield
6
- ensure
7
- clear_rails_error_reporter!
2
+ def run_appsignal_railtie
3
+ app = MyApp::Application.new
4
+ Appsignal::Integrations::Railtie.initializers.each do |initializer|
5
+ initializer.run(app)
6
+ end
7
+ ActiveSupport.run_load_hooks(:after_initialize, app)
8
8
  end
9
9
 
10
10
  def with_rails_error_reporter
@@ -15,30 +15,8 @@ module TransactionHelpers
15
15
  Appsignal::Transaction.create(namespace)
16
16
  end
17
17
 
18
- def new_transaction(namespace = default_namespace)
19
- Appsignal::Transaction.new(SecureRandom.uuid, namespace)
20
- end
21
-
22
- def legacy_create_transaction(
23
- id: "mock_transaction_id",
24
- namespace: "mock_namespace",
25
- request: legacy_request,
26
- options: {}
27
- )
28
- Appsignal::Transaction.create(id, namespace, request, options)
29
- end
30
-
31
- def legacy_new_transaction(
32
- id: "mock_transaction_id",
33
- namespace: "mock_namespace",
34
- request: legacy_request,
35
- options: {}
36
- )
37
- Appsignal::Transaction.new(id, namespace, request, options)
38
- end
39
-
40
- def legacy_request(env = {})
41
- Appsignal::Transaction::InternalGenericRequest.new(env)
18
+ def new_transaction(namespace = default_namespace, ext: nil)
19
+ Appsignal::Transaction.new(SecureRandom.uuid, namespace, :ext => ext)
42
20
  end
43
21
 
44
22
  def rack_request(env)
@@ -171,9 +171,9 @@ RSpec::Matchers.define :include_breadcrumb do |action, category, message, metada
171
171
  {
172
172
  "action" => action,
173
173
  "category" => category,
174
- "message" => message,
175
- "metadata" => metadata,
176
- "time" => time
174
+ "message" => message || "",
175
+ "metadata" => metadata || {},
176
+ "time" => time || kind_of(Integer)
177
177
  }
178
178
  end
179
179
  end
@@ -7,9 +7,9 @@ class AppsignalMock
7
7
  end
8
8
 
9
9
  def config
10
- ConfigHelpers.project_fixture_config.tap do |conf|
11
- conf[:hostname] = @hostname if @hostname
12
- end
10
+ options = {}
11
+ options[:hostname] = @hostname if @hostname
12
+ ConfigHelpers.build_config(:options => options)
13
13
  end
14
14
 
15
15
  def set_gauge(*args)
@@ -2,10 +2,12 @@ class MockProbe
2
2
  attr_reader :calls
3
3
 
4
4
  def initialize
5
+ Appsignal::Testing.store[:mock_probe_call] = 0
5
6
  @calls = 0
6
7
  end
7
8
 
8
9
  def call
10
+ Appsignal::Testing.store[:mock_probe_call] += 1
9
11
  @calls += 1
10
12
  end
11
13
  end
@@ -171,7 +171,7 @@ module AppsignalTest
171
171
  # transactions are created on the {Appsignal::Testing.transactions} list.
172
172
  #
173
173
  # @see TransactionHelpers#last_transaction
174
- def new(*_args)
174
+ def new(...)
175
175
  transaction = super
176
176
  Appsignal::Testing.transactions << transaction
177
177
  transaction
@@ -180,7 +180,7 @@ module AppsignalTest
180
180
 
181
181
  module InstanceMethods
182
182
  def _sample
183
- _sample_data
183
+ sample_data
184
184
  end
185
185
  end
186
186
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.2
4
+ version: 4.0.0.beta.1
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Beekman
8
8
  - Thijs Cadier
9
9
  - Tom de Bruijn
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 1980-01-02 00:00:00.000000000 Z
13
+ date: 2024-08-19 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rack
@@ -184,11 +185,11 @@ files:
184
185
  - gemfiles/psych-3.gemfile
185
186
  - gemfiles/psych-4.gemfile
186
187
  - gemfiles/que.gemfile
187
- - gemfiles/que_beta.gemfile
188
188
  - gemfiles/rails-6.0.gemfile
189
189
  - gemfiles/rails-6.1.gemfile
190
190
  - gemfiles/rails-7.0.gemfile
191
191
  - gemfiles/rails-7.1.gemfile
192
+ - gemfiles/rails-7.2.gemfile
192
193
  - gemfiles/redis-4.gemfile
193
194
  - gemfiles/redis-5.gemfile
194
195
  - gemfiles/resque-2.gemfile
@@ -224,7 +225,6 @@ files:
224
225
  - lib/appsignal/extension.rb
225
226
  - lib/appsignal/extension/jruby.rb
226
227
  - lib/appsignal/garbage_collection.rb
227
- - lib/appsignal/helpers/heartbeat.rb
228
228
  - lib/appsignal/helpers/instrumentation.rb
229
229
  - lib/appsignal/helpers/metrics.rb
230
230
  - lib/appsignal/hooks.rb
@@ -232,6 +232,7 @@ files:
232
232
  - lib/appsignal/hooks/action_mailer.rb
233
233
  - lib/appsignal/hooks/active_job.rb
234
234
  - lib/appsignal/hooks/active_support_notifications.rb
235
+ - lib/appsignal/hooks/at_exit.rb
235
236
  - lib/appsignal/hooks/celluloid.rb
236
237
  - lib/appsignal/hooks/data_mapper.rb
237
238
  - lib/appsignal/hooks/delayed_job.rb
@@ -262,13 +263,10 @@ files:
262
263
  - lib/appsignal/integrations/delayed_job_plugin.rb
263
264
  - lib/appsignal/integrations/dry_monitor.rb
264
265
  - lib/appsignal/integrations/excon.rb
265
- - lib/appsignal/integrations/grape.rb
266
- - lib/appsignal/integrations/hanami.rb
267
266
  - lib/appsignal/integrations/http.rb
268
267
  - lib/appsignal/integrations/mongo_ruby_driver.rb
269
268
  - lib/appsignal/integrations/net_http.rb
270
269
  - lib/appsignal/integrations/object.rb
271
- - lib/appsignal/integrations/padrino.rb
272
270
  - lib/appsignal/integrations/que.rb
273
271
  - lib/appsignal/integrations/railtie.rb
274
272
  - lib/appsignal/integrations/rake.rb
@@ -277,7 +275,6 @@ files:
277
275
  - lib/appsignal/integrations/resque.rb
278
276
  - lib/appsignal/integrations/shoryuken.rb
279
277
  - lib/appsignal/integrations/sidekiq.rb
280
- - lib/appsignal/integrations/sinatra.rb
281
278
  - lib/appsignal/integrations/unicorn.rb
282
279
  - lib/appsignal/integrations/webmachine.rb
283
280
  - lib/appsignal/loaders.rb
@@ -296,13 +293,12 @@ files:
296
293
  - lib/appsignal/rack/abstract_middleware.rb
297
294
  - lib/appsignal/rack/body_wrapper.rb
298
295
  - lib/appsignal/rack/event_handler.rb
299
- - lib/appsignal/rack/generic_instrumentation.rb
300
296
  - lib/appsignal/rack/grape_middleware.rb
301
297
  - lib/appsignal/rack/hanami_middleware.rb
302
298
  - lib/appsignal/rack/instrumentation_middleware.rb
303
299
  - lib/appsignal/rack/rails_instrumentation.rb
304
300
  - lib/appsignal/rack/sinatra_instrumentation.rb
305
- - lib/appsignal/rack/streaming_listener.rb
301
+ - lib/appsignal/sample_data.rb
306
302
  - lib/appsignal/span.rb
307
303
  - lib/appsignal/system.rb
308
304
  - lib/appsignal/transaction.rb
@@ -358,6 +354,7 @@ files:
358
354
  - spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb
359
355
  - spec/lib/appsignal/hooks/active_support_notifications_spec.rb
360
356
  - spec/lib/appsignal/hooks/activejob_spec.rb
357
+ - spec/lib/appsignal/hooks/at_exit_spec.rb
361
358
  - spec/lib/appsignal/hooks/celluloid_spec.rb
362
359
  - spec/lib/appsignal/hooks/data_mapper_spec.rb
363
360
  - spec/lib/appsignal/hooks/delayed_job_spec.rb
@@ -383,18 +380,14 @@ files:
383
380
  - spec/lib/appsignal/hooks_spec.rb
384
381
  - spec/lib/appsignal/integrations/data_mapper_spec.rb
385
382
  - spec/lib/appsignal/integrations/delayed_job_plugin_spec.rb
386
- - spec/lib/appsignal/integrations/grape_spec.rb
387
- - spec/lib/appsignal/integrations/hanami_spec.rb
388
383
  - spec/lib/appsignal/integrations/http_spec.rb
389
384
  - spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb
390
385
  - spec/lib/appsignal/integrations/net_http_spec.rb
391
386
  - spec/lib/appsignal/integrations/object_spec.rb
392
- - spec/lib/appsignal/integrations/padrino_spec.rb
393
387
  - spec/lib/appsignal/integrations/que_spec.rb
394
388
  - spec/lib/appsignal/integrations/railtie_spec.rb
395
389
  - spec/lib/appsignal/integrations/shoryuken_spec.rb
396
390
  - spec/lib/appsignal/integrations/sidekiq_spec.rb
397
- - spec/lib/appsignal/integrations/sinatra_spec.rb
398
391
  - spec/lib/appsignal/integrations/webmachine_spec.rb
399
392
  - spec/lib/appsignal/loaders/grape_spec.rb
400
393
  - spec/lib/appsignal/loaders/hanami_spec.rb
@@ -410,14 +403,13 @@ files:
410
403
  - spec/lib/appsignal/rack/abstract_middleware_spec.rb
411
404
  - spec/lib/appsignal/rack/body_wrapper_spec.rb
412
405
  - spec/lib/appsignal/rack/event_handler_spec.rb
413
- - spec/lib/appsignal/rack/generic_instrumentation_spec.rb
414
406
  - spec/lib/appsignal/rack/grape_middleware_spec.rb
415
407
  - spec/lib/appsignal/rack/hanami_middleware_spec.rb
416
408
  - spec/lib/appsignal/rack/instrumentation_middleware_spec.rb
417
409
  - spec/lib/appsignal/rack/rails_instrumentation_spec.rb
418
410
  - spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb
419
- - spec/lib/appsignal/rack/streaming_listener_spec.rb
420
411
  - spec/lib/appsignal/rack_spec.rb
412
+ - spec/lib/appsignal/sample_data_spec.rb
421
413
  - spec/lib/appsignal/span_spec.rb
422
414
  - spec/lib/appsignal/system_spec.rb
423
415
  - spec/lib/appsignal/transaction_spec.rb
@@ -433,12 +425,12 @@ files:
433
425
  - spec/spec_helper.rb
434
426
  - spec/support/fixtures/generated_config.yml
435
427
  - spec/support/fixtures/projects/broken/config/appsignal.yml
436
- - spec/support/fixtures/projects/valid/config/application.rb
437
428
  - spec/support/fixtures/projects/valid/config/appsignal.yml
438
- - spec/support/fixtures/projects/valid/config/environments/development.rb
439
- - spec/support/fixtures/projects/valid/config/environments/production.rb
440
- - spec/support/fixtures/projects/valid/config/environments/test.rb
441
429
  - spec/support/fixtures/projects/valid/log/.gitkeep
430
+ - spec/support/fixtures/projects/valid_with_rails_app/config/application.rb
431
+ - spec/support/fixtures/projects/valid_with_rails_app/config/appsignal.yml
432
+ - spec/support/fixtures/projects/valid_with_rails_app/config/environment.rb
433
+ - spec/support/fixtures/projects/valid_with_rails_app/log/.gitkeep
442
434
  - spec/support/fixtures/uploaded_file.txt
443
435
  - spec/support/hanami/hanami_app.rb
444
436
  - spec/support/helpers/action_mailer_helpers.rb
@@ -468,7 +460,6 @@ files:
468
460
  - spec/support/mocks/fake_gc_profiler.rb
469
461
  - spec/support/mocks/fake_gvl_tools.rb
470
462
  - spec/support/mocks/mock_probe.rb
471
- - spec/support/rails/my_app.rb
472
463
  - spec/support/shared_examples/instrument.rb
473
464
  - spec/support/stubs/appsignal/loaders/loader_stub.rb
474
465
  - spec/support/stubs/delayed_job.rb
@@ -486,6 +477,7 @@ metadata:
486
477
  documentation_uri: https://docs.appsignal.com/ruby/
487
478
  homepage_uri: https://docs.appsignal.com/ruby/
488
479
  source_code_uri: https://github.com/appsignal/appsignal-ruby
480
+ post_install_message:
489
481
  rdoc_options: []
490
482
  require_paths:
491
483
  - lib
@@ -501,7 +493,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
501
493
  - !ruby/object:Gem::Version
502
494
  version: '0'
503
495
  requirements: []
504
- rubygems_version: 3.6.9
496
+ rubygems_version: 3.5.14
497
+ signing_key:
505
498
  specification_version: 4
506
499
  summary: Logs performance and exception data from your app to appsignal.com
507
500
  test_files: []
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'que', '1.0.0.beta3'
4
-
5
- gemspec :path => '../'
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Appsignal
4
- module Helpers
5
- module Heartbeat
6
- # @deprecated Use {Appsignal::CheckIn.cron} instead.
7
- def heartbeat(name, &block)
8
- unless @heartbeat_helper_deprecation_warning_emitted
9
- callers = caller
10
- Appsignal::Utils::StdoutAndLoggerMessage.warning \
11
- "The helper Appsignal.heartbeat has been deprecated. " \
12
- "Please update the helper call to Appsignal::CheckIn.cron " \
13
- "in the following file and elsewhere to remove this message.\n#{callers.first}"
14
- @heartbeat_helper_deprecation_warning_emitted = true
15
- end
16
- Appsignal::CheckIn.cron(name, &block)
17
- end
18
- end
19
- end
20
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "appsignal"
4
- require "appsignal/rack/grape_middleware"
5
-
6
- Appsignal::Utils::StdoutAndLoggerMessage.warning(
7
- "The 'require \"appsignal/integrations/grape\"' file require integration " \
8
- "method is deprecated. " \
9
- "Please follow the Grape setup guide in our docs for the new method: " \
10
- "https://docs.appsignal.com/ruby/integrations/grape.html"
11
- )
12
-
13
- Appsignal.internal_logger.debug("Loading Grape integration")
14
-
15
- module Appsignal
16
- # @api private
17
- module Grape
18
- # Alias constants that have moved with a warning message that points to the
19
- # place to update the reference.
20
- def self.const_missing(name)
21
- case name
22
- when :Middleware
23
- callers = caller
24
- Appsignal::Utils::StdoutAndLoggerMessage.warning \
25
- "The constant Appsignal::Grape::Middleware has been deprecated. " \
26
- "Please update the constant name to " \
27
- "Appsignal::Rack::GrapeMiddleware in the following file to " \
28
- "remove this message.\n#{callers.first}"
29
- Appsignal::Rack::GrapeMiddleware
30
- else
31
- super
32
- end
33
- end
34
- end
35
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "appsignal"
4
-
5
- Appsignal::Utils::StdoutAndLoggerMessage.warning(
6
- "The 'require \"appsignal/integrations/hanami\"' file require integration " \
7
- "method is deprecated. " \
8
- "Please follow the Hanami setup guide in our docs for the new method: " \
9
- "https://docs.appsignal.com/ruby/integrations/hanami.html"
10
- )
11
-
12
- Appsignal.load(:hanami)
13
- Appsignal.start
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "appsignal"
4
-
5
- Appsignal::Utils::StdoutAndLoggerMessage.warning(
6
- "The 'require \"appsignal/integrations/padrino\"' file require integration " \
7
- "method is deprecated. " \
8
- "Please follow the Padrino setup guide in our docs for the new method: " \
9
- "https://docs.appsignal.com/ruby/integrations/padrino.html"
10
- )
11
-
12
- Appsignal.load(:padrino)
13
- Appsignal.start
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "appsignal"
4
-
5
- Appsignal::Utils::StdoutAndLoggerMessage.warning(
6
- "The 'require \"appsignal/integrations/sinatra\"' file require integration " \
7
- "method is deprecated. " \
8
- "Please follow the Sinatra setup guide in our docs for the new method: " \
9
- "https://docs.appsignal.com/ruby/integrations/sinatra.html"
10
- )
11
-
12
- Appsignal.load(:sinatra)
13
- Appsignal.start
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Appsignal
4
- module Rack
5
- # @deprecated Use {InstrumentationMiddleware} instead.
6
- # @api private
7
- class GenericInstrumentation < AbstractMiddleware
8
- def initialize(app, options = {})
9
- options[:instrument_event_name] ||= "process_action.generic"
10
- super
11
- end
12
-
13
- def add_transaction_metadata_after(transaction, request)
14
- super
15
- transaction.set_action_if_nil("unknown")
16
- end
17
- end
18
-
19
- # @api private
20
- class GenericInstrumentationAlias < GenericInstrumentation; end
21
- end
22
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Appsignal::Utils::StdoutAndLoggerMessage.warning \
4
- "The constant Appsignal::Rack::StreamingListener has been deprecated. " \
5
- "Please update the constant name to " \
6
- "Appsignal::Rack::InstrumentationMiddleware."
7
-
8
- module Appsignal
9
- module Rack
10
- # Instrumentation middleware that tracks exceptions in streaming Rack
11
- # responses.
12
- #
13
- # @deprecated Use {InstrumentationMiddleware} instead.
14
- # @api private
15
- class StreamingListener < AbstractMiddleware
16
- def initialize(app, options = {})
17
- options[:instrument_event_name] ||= "process_streaming_request.rack"
18
- super
19
- end
20
-
21
- def add_transaction_metadata_after(transaction, request)
22
- transaction.set_action_if_nil(request.env["appsignal.action"])
23
-
24
- super
25
- end
26
- end
27
- end
28
- end