appsignal 3.13.1-java → 4.0.0.beta.1-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 +499 -487
- data/CHANGELOG.md +104 -7
- data/Rakefile +31 -7
- data/benchmark.rake +4 -6
- data/build_matrix.yml +45 -39
- data/ext/agent.rb +27 -27
- data/ext/appsignal_extension.c +25 -0
- data/gemfiles/rails-7.2.gemfile +11 -0
- data/lib/appsignal/check_in/cron.rb +2 -15
- data/lib/appsignal/cli/diagnose.rb +37 -28
- data/lib/appsignal/cli/install.rb +5 -1
- data/lib/appsignal/config.rb +57 -119
- data/lib/appsignal/demo.rb +2 -2
- data/lib/appsignal/extension/jruby.rb +14 -0
- data/lib/appsignal/helpers/instrumentation.rb +139 -417
- data/lib/appsignal/helpers/metrics.rb +0 -16
- data/lib/appsignal/hooks/action_cable.rb +8 -8
- data/lib/appsignal/hooks/active_job.rb +2 -2
- data/lib/appsignal/hooks/at_exit.rb +37 -0
- data/lib/appsignal/hooks.rb +1 -16
- data/lib/appsignal/integrations/action_cable.rb +2 -2
- data/lib/appsignal/integrations/capistrano/appsignal.cap +2 -4
- data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +1 -4
- data/lib/appsignal/integrations/delayed_job_plugin.rb +3 -3
- data/lib/appsignal/integrations/que.rb +2 -2
- data/lib/appsignal/integrations/railtie.rb +26 -59
- data/lib/appsignal/integrations/rake.rb +2 -2
- data/lib/appsignal/integrations/resque.rb +2 -2
- data/lib/appsignal/integrations/shoryuken.rb +4 -4
- data/lib/appsignal/integrations/sidekiq.rb +3 -3
- data/lib/appsignal/integrations/webmachine.rb +2 -2
- data/lib/appsignal/loaders.rb +1 -1
- data/lib/appsignal/probes.rb +0 -9
- data/lib/appsignal/rack/abstract_middleware.rb +4 -26
- data/lib/appsignal/rack/body_wrapper.rb +0 -12
- data/lib/appsignal/rack/event_handler.rb +4 -4
- data/lib/appsignal/rack/rails_instrumentation.rb +1 -1
- data/lib/appsignal/rack.rb +0 -25
- data/lib/appsignal/sample_data.rb +95 -0
- data/lib/appsignal/transaction.rb +235 -361
- data/lib/appsignal/utils/rails_helper.rb +4 -0
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +19 -71
- data/spec/lib/appsignal/auth_check_spec.rb +1 -1
- data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
- data/spec/lib/appsignal/capistrano3_spec.rb +53 -13
- data/spec/lib/appsignal/check_in_spec.rb +1 -207
- data/spec/lib/appsignal/cli/demo_spec.rb +7 -27
- data/spec/lib/appsignal/cli/diagnose_spec.rb +145 -110
- data/spec/lib/appsignal/config_spec.rb +304 -379
- data/spec/lib/appsignal/extension_install_failure_spec.rb +5 -1
- data/spec/lib/appsignal/extension_spec.rb +5 -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 -2
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +1 -0
- data/spec/lib/appsignal/hooks/activejob_spec.rb +7 -12
- data/spec/lib/appsignal/hooks/at_exit_spec.rb +72 -0
- data/spec/lib/appsignal/hooks/gvl_spec.rb +10 -5
- data/spec/lib/appsignal/hooks/http_spec.rb +3 -3
- data/spec/lib/appsignal/hooks/net_http_spec.rb +3 -3
- data/spec/lib/appsignal/hooks/rake_spec.rb +6 -9
- data/spec/lib/appsignal/hooks/redis_client_spec.rb +5 -10
- data/spec/lib/appsignal/hooks/redis_spec.rb +4 -7
- data/spec/lib/appsignal/hooks/resque_spec.rb +3 -5
- data/spec/lib/appsignal/hooks_spec.rb +0 -41
- data/spec/lib/appsignal/integrations/data_mapper_spec.rb +29 -20
- data/spec/lib/appsignal/integrations/delayed_job_plugin_spec.rb +4 -9
- data/spec/lib/appsignal/integrations/railtie_spec.rb +179 -157
- data/spec/lib/appsignal/integrations/shoryuken_spec.rb +3 -5
- data/spec/lib/appsignal/integrations/sidekiq_spec.rb +48 -62
- data/spec/lib/appsignal/loaders/hanami_spec.rb +6 -9
- data/spec/lib/appsignal/loaders/padrino_spec.rb +6 -10
- data/spec/lib/appsignal/loaders/sinatra_spec.rb +6 -9
- data/spec/lib/appsignal/loaders_spec.rb +8 -1
- data/spec/lib/appsignal/marker_spec.rb +1 -1
- data/spec/lib/appsignal/probes_spec.rb +4 -83
- data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +4 -63
- data/spec/lib/appsignal/rack/body_wrapper_spec.rb +0 -48
- data/spec/lib/appsignal/rack/event_handler_spec.rb +18 -15
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +3 -11
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +4 -5
- data/spec/lib/appsignal/sample_data_spec.rb +174 -0
- data/spec/lib/appsignal/transaction_spec.rb +791 -1031
- data/spec/lib/appsignal/transmitter_spec.rb +6 -8
- data/spec/lib/appsignal_spec.rb +294 -643
- data/spec/spec_helper.rb +1 -3
- data/spec/support/fixtures/projects/valid/config/appsignal.yml +4 -7
- data/spec/support/fixtures/projects/valid_with_rails_app/config/application.rb +16 -0
- data/spec/support/fixtures/projects/valid_with_rails_app/config/appsignal.yml +56 -0
- data/spec/support/fixtures/projects/valid_with_rails_app/config/environment.rb +5 -0
- data/spec/support/helpers/api_request_helper.rb +3 -2
- data/spec/support/helpers/config_helpers.rb +41 -11
- data/spec/support/helpers/dependency_helper.rb +8 -0
- data/spec/support/helpers/log_helpers.rb +1 -0
- data/spec/support/helpers/rails_helper.rb +6 -6
- data/spec/support/helpers/transaction_helpers.rb +2 -24
- data/spec/support/matchers/transaction.rb +3 -3
- data/spec/support/mocks/appsignal_mock.rb +3 -3
- data/spec/support/mocks/mock_probe.rb +2 -0
- data/spec/support/testing.rb +2 -2
- metadata +11 -21
- data/gemfiles/que_beta.gemfile +0 -5
- data/lib/appsignal/helpers/heartbeat.rb +0 -20
- data/lib/appsignal/integrations/grape.rb +0 -35
- data/lib/appsignal/integrations/hanami.rb +0 -13
- data/lib/appsignal/integrations/padrino.rb +0 -13
- data/lib/appsignal/integrations/sinatra.rb +0 -13
- data/lib/appsignal/rack/generic_instrumentation.rb +0 -22
- data/lib/appsignal/rack/streaming_listener.rb +0 -28
- data/spec/lib/appsignal/integrations/grape_spec.rb +0 -36
- data/spec/lib/appsignal/integrations/hanami_spec.rb +0 -17
- data/spec/lib/appsignal/integrations/padrino_spec.rb +0 -15
- data/spec/lib/appsignal/integrations/sinatra_spec.rb +0 -15
- data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +0 -81
- data/spec/lib/appsignal/rack/streaming_listener_spec.rb +0 -69
- data/spec/support/fixtures/projects/valid/config/environments/development.rb +0 -0
- data/spec/support/fixtures/projects/valid/config/environments/production.rb +0 -0
- data/spec/support/fixtures/projects/valid/config/environments/test.rb +0 -0
- data/spec/support/rails/my_app.rb +0 -6
- /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
|
-
|
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
|
@@ -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
|
-
|
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
|
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
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
logger
|
25
|
+
).tap do |c|
|
26
|
+
c.merge_dsl_options(options)
|
27
|
+
c.validate
|
28
|
+
end
|
29
|
+
end
|
30
|
+
module_function :project_fixture_config
|
31
|
+
|
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
|
22
46
|
end
|
23
|
-
module_function :
|
47
|
+
module_function :build_config
|
24
48
|
|
25
|
-
def start_agent(env
|
26
|
-
|
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
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module RailsHelper
|
2
|
-
def
|
3
|
-
|
4
|
-
Appsignal::Integrations::Railtie.
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
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)
|
data/spec/support/testing.rb
CHANGED
@@ -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(
|
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
|
-
|
183
|
+
sample_data
|
184
184
|
end
|
185
185
|
end
|
186
186
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.beta.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-08-
|
13
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -185,11 +185,11 @@ files:
|
|
185
185
|
- gemfiles/psych-3.gemfile
|
186
186
|
- gemfiles/psych-4.gemfile
|
187
187
|
- gemfiles/que.gemfile
|
188
|
-
- gemfiles/que_beta.gemfile
|
189
188
|
- gemfiles/rails-6.0.gemfile
|
190
189
|
- gemfiles/rails-6.1.gemfile
|
191
190
|
- gemfiles/rails-7.0.gemfile
|
192
191
|
- gemfiles/rails-7.1.gemfile
|
192
|
+
- gemfiles/rails-7.2.gemfile
|
193
193
|
- gemfiles/redis-4.gemfile
|
194
194
|
- gemfiles/redis-5.gemfile
|
195
195
|
- gemfiles/resque-2.gemfile
|
@@ -225,7 +225,6 @@ files:
|
|
225
225
|
- lib/appsignal/extension.rb
|
226
226
|
- lib/appsignal/extension/jruby.rb
|
227
227
|
- lib/appsignal/garbage_collection.rb
|
228
|
-
- lib/appsignal/helpers/heartbeat.rb
|
229
228
|
- lib/appsignal/helpers/instrumentation.rb
|
230
229
|
- lib/appsignal/helpers/metrics.rb
|
231
230
|
- lib/appsignal/hooks.rb
|
@@ -233,6 +232,7 @@ files:
|
|
233
232
|
- lib/appsignal/hooks/action_mailer.rb
|
234
233
|
- lib/appsignal/hooks/active_job.rb
|
235
234
|
- lib/appsignal/hooks/active_support_notifications.rb
|
235
|
+
- lib/appsignal/hooks/at_exit.rb
|
236
236
|
- lib/appsignal/hooks/celluloid.rb
|
237
237
|
- lib/appsignal/hooks/data_mapper.rb
|
238
238
|
- lib/appsignal/hooks/delayed_job.rb
|
@@ -263,13 +263,10 @@ files:
|
|
263
263
|
- lib/appsignal/integrations/delayed_job_plugin.rb
|
264
264
|
- lib/appsignal/integrations/dry_monitor.rb
|
265
265
|
- lib/appsignal/integrations/excon.rb
|
266
|
-
- lib/appsignal/integrations/grape.rb
|
267
|
-
- lib/appsignal/integrations/hanami.rb
|
268
266
|
- lib/appsignal/integrations/http.rb
|
269
267
|
- lib/appsignal/integrations/mongo_ruby_driver.rb
|
270
268
|
- lib/appsignal/integrations/net_http.rb
|
271
269
|
- lib/appsignal/integrations/object.rb
|
272
|
-
- lib/appsignal/integrations/padrino.rb
|
273
270
|
- lib/appsignal/integrations/que.rb
|
274
271
|
- lib/appsignal/integrations/railtie.rb
|
275
272
|
- lib/appsignal/integrations/rake.rb
|
@@ -278,7 +275,6 @@ files:
|
|
278
275
|
- lib/appsignal/integrations/resque.rb
|
279
276
|
- lib/appsignal/integrations/shoryuken.rb
|
280
277
|
- lib/appsignal/integrations/sidekiq.rb
|
281
|
-
- lib/appsignal/integrations/sinatra.rb
|
282
278
|
- lib/appsignal/integrations/unicorn.rb
|
283
279
|
- lib/appsignal/integrations/webmachine.rb
|
284
280
|
- lib/appsignal/loaders.rb
|
@@ -297,13 +293,12 @@ files:
|
|
297
293
|
- lib/appsignal/rack/abstract_middleware.rb
|
298
294
|
- lib/appsignal/rack/body_wrapper.rb
|
299
295
|
- lib/appsignal/rack/event_handler.rb
|
300
|
-
- lib/appsignal/rack/generic_instrumentation.rb
|
301
296
|
- lib/appsignal/rack/grape_middleware.rb
|
302
297
|
- lib/appsignal/rack/hanami_middleware.rb
|
303
298
|
- lib/appsignal/rack/instrumentation_middleware.rb
|
304
299
|
- lib/appsignal/rack/rails_instrumentation.rb
|
305
300
|
- lib/appsignal/rack/sinatra_instrumentation.rb
|
306
|
-
- lib/appsignal/
|
301
|
+
- lib/appsignal/sample_data.rb
|
307
302
|
- lib/appsignal/span.rb
|
308
303
|
- lib/appsignal/system.rb
|
309
304
|
- lib/appsignal/transaction.rb
|
@@ -359,6 +354,7 @@ files:
|
|
359
354
|
- spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb
|
360
355
|
- spec/lib/appsignal/hooks/active_support_notifications_spec.rb
|
361
356
|
- spec/lib/appsignal/hooks/activejob_spec.rb
|
357
|
+
- spec/lib/appsignal/hooks/at_exit_spec.rb
|
362
358
|
- spec/lib/appsignal/hooks/celluloid_spec.rb
|
363
359
|
- spec/lib/appsignal/hooks/data_mapper_spec.rb
|
364
360
|
- spec/lib/appsignal/hooks/delayed_job_spec.rb
|
@@ -384,18 +380,14 @@ files:
|
|
384
380
|
- spec/lib/appsignal/hooks_spec.rb
|
385
381
|
- spec/lib/appsignal/integrations/data_mapper_spec.rb
|
386
382
|
- spec/lib/appsignal/integrations/delayed_job_plugin_spec.rb
|
387
|
-
- spec/lib/appsignal/integrations/grape_spec.rb
|
388
|
-
- spec/lib/appsignal/integrations/hanami_spec.rb
|
389
383
|
- spec/lib/appsignal/integrations/http_spec.rb
|
390
384
|
- spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb
|
391
385
|
- spec/lib/appsignal/integrations/net_http_spec.rb
|
392
386
|
- spec/lib/appsignal/integrations/object_spec.rb
|
393
|
-
- spec/lib/appsignal/integrations/padrino_spec.rb
|
394
387
|
- spec/lib/appsignal/integrations/que_spec.rb
|
395
388
|
- spec/lib/appsignal/integrations/railtie_spec.rb
|
396
389
|
- spec/lib/appsignal/integrations/shoryuken_spec.rb
|
397
390
|
- spec/lib/appsignal/integrations/sidekiq_spec.rb
|
398
|
-
- spec/lib/appsignal/integrations/sinatra_spec.rb
|
399
391
|
- spec/lib/appsignal/integrations/webmachine_spec.rb
|
400
392
|
- spec/lib/appsignal/loaders/grape_spec.rb
|
401
393
|
- spec/lib/appsignal/loaders/hanami_spec.rb
|
@@ -411,14 +403,13 @@ files:
|
|
411
403
|
- spec/lib/appsignal/rack/abstract_middleware_spec.rb
|
412
404
|
- spec/lib/appsignal/rack/body_wrapper_spec.rb
|
413
405
|
- spec/lib/appsignal/rack/event_handler_spec.rb
|
414
|
-
- spec/lib/appsignal/rack/generic_instrumentation_spec.rb
|
415
406
|
- spec/lib/appsignal/rack/grape_middleware_spec.rb
|
416
407
|
- spec/lib/appsignal/rack/hanami_middleware_spec.rb
|
417
408
|
- spec/lib/appsignal/rack/instrumentation_middleware_spec.rb
|
418
409
|
- spec/lib/appsignal/rack/rails_instrumentation_spec.rb
|
419
410
|
- spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb
|
420
|
-
- spec/lib/appsignal/rack/streaming_listener_spec.rb
|
421
411
|
- spec/lib/appsignal/rack_spec.rb
|
412
|
+
- spec/lib/appsignal/sample_data_spec.rb
|
422
413
|
- spec/lib/appsignal/span_spec.rb
|
423
414
|
- spec/lib/appsignal/system_spec.rb
|
424
415
|
- spec/lib/appsignal/transaction_spec.rb
|
@@ -434,12 +425,12 @@ files:
|
|
434
425
|
- spec/spec_helper.rb
|
435
426
|
- spec/support/fixtures/generated_config.yml
|
436
427
|
- spec/support/fixtures/projects/broken/config/appsignal.yml
|
437
|
-
- spec/support/fixtures/projects/valid/config/application.rb
|
438
428
|
- spec/support/fixtures/projects/valid/config/appsignal.yml
|
439
|
-
- spec/support/fixtures/projects/valid/config/environments/development.rb
|
440
|
-
- spec/support/fixtures/projects/valid/config/environments/production.rb
|
441
|
-
- spec/support/fixtures/projects/valid/config/environments/test.rb
|
442
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
|
443
434
|
- spec/support/fixtures/uploaded_file.txt
|
444
435
|
- spec/support/hanami/hanami_app.rb
|
445
436
|
- spec/support/helpers/action_mailer_helpers.rb
|
@@ -469,7 +460,6 @@ files:
|
|
469
460
|
- spec/support/mocks/fake_gc_profiler.rb
|
470
461
|
- spec/support/mocks/fake_gvl_tools.rb
|
471
462
|
- spec/support/mocks/mock_probe.rb
|
472
|
-
- spec/support/rails/my_app.rb
|
473
463
|
- spec/support/shared_examples/instrument.rb
|
474
464
|
- spec/support/stubs/appsignal/loaders/loader_stub.rb
|
475
465
|
- spec/support/stubs/delayed_job.rb
|
data/gemfiles/que_beta.gemfile
DELETED
@@ -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
|