appsignal 4.0.5 → 4.0.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Rakefile +9 -9
- data/appsignal.gemspec +22 -1
- data/build_matrix.yml +2 -1
- data/ext/agent.rb +27 -27
- data/lib/appsignal/check_in/scheduler.rb +3 -4
- data/lib/appsignal/check_in.rb +1 -1
- data/lib/appsignal/config.rb +1 -3
- data/lib/appsignal/integrations/que.rb +8 -2
- data/lib/appsignal/integrations/resque.rb +1 -6
- data/lib/appsignal/utils/hash_sanitizer.rb +4 -0
- data/lib/appsignal/version.rb +1 -1
- metadata +2 -191
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- data/.github/ISSUE_TEMPLATE/chore.md +0 -14
- data/.github/workflows/ci.yml +0 -3150
- data/.github/workflows/create_release_from_tag.yml +0 -62
- data/.gitignore +0 -35
- data/.gitmodules +0 -3
- data/.rspec +0 -4
- data/.yardopts +0 -8
- data/benchmark.rake +0 -139
- data/gemfiles/capistrano2.gemfile +0 -6
- data/gemfiles/capistrano3.gemfile +0 -7
- data/gemfiles/dry-monitor.gemfile +0 -5
- data/gemfiles/grape.gemfile +0 -5
- data/gemfiles/hanami-2.0.gemfile +0 -7
- data/gemfiles/hanami-2.1.gemfile +0 -7
- data/gemfiles/http5.gemfile +0 -5
- data/gemfiles/no_dependencies.gemfile +0 -10
- data/gemfiles/padrino.gemfile +0 -7
- data/gemfiles/psych-3.gemfile +0 -5
- data/gemfiles/psych-4.gemfile +0 -5
- data/gemfiles/que.gemfile +0 -5
- data/gemfiles/rails-6.0.gemfile +0 -10
- data/gemfiles/rails-6.1.gemfile +0 -11
- data/gemfiles/rails-7.0.gemfile +0 -11
- data/gemfiles/rails-7.1.gemfile +0 -11
- data/gemfiles/rails-7.2.gemfile +0 -11
- data/gemfiles/redis-4.gemfile +0 -5
- data/gemfiles/redis-5.gemfile +0 -6
- data/gemfiles/resque-2.gemfile +0 -6
- data/gemfiles/sequel.gemfile +0 -10
- data/gemfiles/sinatra.gemfile +0 -5
- data/gemfiles/webmachine1.gemfile +0 -7
- data/gemfiles/webmachine2.gemfile +0 -6
- data/mono.yml +0 -16
- data/spec/.rubocop.yml +0 -7
- data/spec/lib/appsignal/auth_check_spec.rb +0 -84
- data/spec/lib/appsignal/capistrano2_spec.rb +0 -227
- data/spec/lib/appsignal/capistrano3_spec.rb +0 -284
- data/spec/lib/appsignal/check_in/cron_spec.rb +0 -202
- data/spec/lib/appsignal/check_in/scheduler_spec.rb +0 -443
- data/spec/lib/appsignal/cli/demo_spec.rb +0 -46
- data/spec/lib/appsignal/cli/diagnose/paths_spec.rb +0 -16
- data/spec/lib/appsignal/cli/diagnose/utils_spec.rb +0 -86
- data/spec/lib/appsignal/cli/diagnose_spec.rb +0 -1553
- data/spec/lib/appsignal/cli/helpers_spec.rb +0 -179
- data/spec/lib/appsignal/cli/install_spec.rb +0 -848
- data/spec/lib/appsignal/cli_spec.rb +0 -56
- data/spec/lib/appsignal/config_spec.rb +0 -1380
- data/spec/lib/appsignal/demo_spec.rb +0 -83
- data/spec/lib/appsignal/environment_spec.rb +0 -190
- data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +0 -60
- data/spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb +0 -21
- data/spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb +0 -21
- data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +0 -52
- data/spec/lib/appsignal/event_formatter/faraday/request_formatter_spec.rb +0 -21
- data/spec/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter_spec.rb +0 -84
- data/spec/lib/appsignal/event_formatter/rom/sql_formatter_spec.rb +0 -22
- data/spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb +0 -30
- data/spec/lib/appsignal/event_formatter/view_component/render_formatter_spec.rb +0 -41
- data/spec/lib/appsignal/event_formatter_spec.rb +0 -193
- data/spec/lib/appsignal/extension/jruby_spec.rb +0 -46
- data/spec/lib/appsignal/extension_install_failure_spec.rb +0 -20
- data/spec/lib/appsignal/extension_spec.rb +0 -178
- data/spec/lib/appsignal/garbage_collection_spec.rb +0 -98
- data/spec/lib/appsignal/hooks/action_cable_spec.rb +0 -345
- data/spec/lib/appsignal/hooks/action_mailer_spec.rb +0 -55
- data/spec/lib/appsignal/hooks/active_support_notifications/finish_with_state_shared_examples.rb +0 -23
- data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +0 -99
- data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +0 -47
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +0 -47
- data/spec/lib/appsignal/hooks/activejob_spec.rb +0 -650
- data/spec/lib/appsignal/hooks/at_exit_spec.rb +0 -105
- data/spec/lib/appsignal/hooks/celluloid_spec.rb +0 -40
- data/spec/lib/appsignal/hooks/data_mapper_spec.rb +0 -40
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +0 -38
- data/spec/lib/appsignal/hooks/dry_monitor_spec.rb +0 -83
- data/spec/lib/appsignal/hooks/excon_spec.rb +0 -67
- data/spec/lib/appsignal/hooks/gvl_spec.rb +0 -145
- data/spec/lib/appsignal/hooks/http_spec.rb +0 -37
- data/spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb +0 -46
- data/spec/lib/appsignal/hooks/mri_spec.rb +0 -23
- data/spec/lib/appsignal/hooks/net_http_spec.rb +0 -18
- data/spec/lib/appsignal/hooks/passenger_spec.rb +0 -30
- data/spec/lib/appsignal/hooks/puma_spec.rb +0 -80
- data/spec/lib/appsignal/hooks/que_spec.rb +0 -19
- data/spec/lib/appsignal/hooks/rake_spec.rb +0 -144
- data/spec/lib/appsignal/hooks/redis_client_spec.rb +0 -218
- data/spec/lib/appsignal/hooks/redis_spec.rb +0 -124
- data/spec/lib/appsignal/hooks/resque_spec.rb +0 -27
- data/spec/lib/appsignal/hooks/sequel_spec.rb +0 -44
- data/spec/lib/appsignal/hooks/shoryuken_spec.rb +0 -29
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +0 -115
- data/spec/lib/appsignal/hooks/unicorn_spec.rb +0 -63
- data/spec/lib/appsignal/hooks/webmachine_spec.rb +0 -24
- data/spec/lib/appsignal/hooks_spec.rb +0 -124
- data/spec/lib/appsignal/integrations/data_mapper_spec.rb +0 -74
- data/spec/lib/appsignal/integrations/delayed_job_plugin_spec.rb +0 -454
- data/spec/lib/appsignal/integrations/http_spec.rb +0 -111
- data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +0 -154
- data/spec/lib/appsignal/integrations/net_http_spec.rb +0 -33
- data/spec/lib/appsignal/integrations/object_spec.rb +0 -347
- data/spec/lib/appsignal/integrations/puma_spec.rb +0 -150
- data/spec/lib/appsignal/integrations/que_spec.rb +0 -152
- data/spec/lib/appsignal/integrations/railtie_spec.rb +0 -457
- data/spec/lib/appsignal/integrations/resque_spec.rb +0 -155
- data/spec/lib/appsignal/integrations/shoryuken_spec.rb +0 -165
- data/spec/lib/appsignal/integrations/sidekiq_spec.rb +0 -640
- data/spec/lib/appsignal/integrations/webmachine_spec.rb +0 -136
- data/spec/lib/appsignal/loaders/grape_spec.rb +0 -12
- data/spec/lib/appsignal/loaders/hanami_spec.rb +0 -92
- data/spec/lib/appsignal/loaders/padrino_spec.rb +0 -273
- data/spec/lib/appsignal/loaders/sinatra_spec.rb +0 -44
- data/spec/lib/appsignal/loaders_spec.rb +0 -144
- data/spec/lib/appsignal/logger_spec.rb +0 -205
- data/spec/lib/appsignal/marker_spec.rb +0 -51
- data/spec/lib/appsignal/probes/gvl_spec.rb +0 -164
- data/spec/lib/appsignal/probes/mri_spec.rb +0 -162
- data/spec/lib/appsignal/probes/sidekiq_spec.rb +0 -333
- data/spec/lib/appsignal/probes_spec.rb +0 -411
- data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +0 -370
- data/spec/lib/appsignal/rack/body_wrapper_spec.rb +0 -319
- data/spec/lib/appsignal/rack/event_handler_spec.rb +0 -441
- data/spec/lib/appsignal/rack/grape_middleware_spec.rb +0 -201
- data/spec/lib/appsignal/rack/hanami_middleware_spec.rb +0 -36
- data/spec/lib/appsignal/rack/instrumentation_middleware_spec.rb +0 -38
- data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +0 -126
- data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +0 -217
- data/spec/lib/appsignal/rack_spec.rb +0 -243
- data/spec/lib/appsignal/sample_data_spec.rb +0 -238
- data/spec/lib/appsignal/span_spec.rb +0 -141
- data/spec/lib/appsignal/system_spec.rb +0 -126
- data/spec/lib/appsignal/transaction_spec.rb +0 -2111
- data/spec/lib/appsignal/transmitter_spec.rb +0 -198
- data/spec/lib/appsignal/utils/data_spec.rb +0 -166
- data/spec/lib/appsignal/utils/hash_sanitizer_spec.rb +0 -182
- data/spec/lib/appsignal/utils/integration_logger_spec.rb +0 -21
- data/spec/lib/appsignal/utils/integration_memory_logger_spec.rb +0 -153
- data/spec/lib/appsignal/utils/json_spec.rb +0 -44
- data/spec/lib/appsignal/utils/query_params_sanitizer_spec.rb +0 -192
- data/spec/lib/appsignal_spec.rb +0 -1919
- data/spec/lib/puma/appsignal_spec.rb +0 -334
- data/spec/spec_helper.rb +0 -173
- data/spec/support/fixtures/generated_config.yml +0 -24
- data/spec/support/fixtures/projects/broken/config/appsignal.yml +0 -1
- data/spec/support/fixtures/projects/valid/config/appsignal.yml +0 -57
- data/spec/support/fixtures/projects/valid/log/.gitkeep +0 -0
- data/spec/support/fixtures/projects/valid_with_rails_app/config/application.rb +0 -16
- data/spec/support/fixtures/projects/valid_with_rails_app/config/appsignal.yml +0 -56
- data/spec/support/fixtures/projects/valid_with_rails_app/config/environment.rb +0 -10
- data/spec/support/fixtures/projects/valid_with_rails_app/log/.gitkeep +0 -0
- data/spec/support/fixtures/uploaded_file.txt +0 -0
- data/spec/support/hanami/hanami_app.rb +0 -29
- data/spec/support/helpers/action_mailer_helpers.rb +0 -25
- data/spec/support/helpers/activejob_helpers.rb +0 -27
- data/spec/support/helpers/api_request_helper.rb +0 -20
- data/spec/support/helpers/cli_helpers.rb +0 -40
- data/spec/support/helpers/config_helpers.rb +0 -66
- data/spec/support/helpers/dependency_helper.rb +0 -150
- data/spec/support/helpers/directory_helper.rb +0 -27
- data/spec/support/helpers/env_helpers.rb +0 -41
- data/spec/support/helpers/environment_metdata_helper.rb +0 -16
- data/spec/support/helpers/example_exception.rb +0 -13
- data/spec/support/helpers/example_standard_error.rb +0 -13
- data/spec/support/helpers/loader_helper.rb +0 -21
- data/spec/support/helpers/log_helpers.rb +0 -36
- data/spec/support/helpers/rails_helper.rb +0 -28
- data/spec/support/helpers/std_streams_helper.rb +0 -94
- data/spec/support/helpers/system_helpers.rb +0 -8
- data/spec/support/helpers/take_at_most_helper.rb +0 -21
- data/spec/support/helpers/time_helpers.rb +0 -11
- data/spec/support/helpers/transaction_helpers.rb +0 -122
- data/spec/support/helpers/wait_for_helper.rb +0 -39
- data/spec/support/matchers/contains_log.rb +0 -26
- data/spec/support/matchers/have_colorized_text.rb +0 -28
- data/spec/support/matchers/transaction.rb +0 -200
- data/spec/support/mocks/appsignal_mock.rb +0 -18
- data/spec/support/mocks/dummy_app.rb +0 -20
- data/spec/support/mocks/fake_gc_profiler.rb +0 -19
- data/spec/support/mocks/fake_gvl_tools.rb +0 -28
- data/spec/support/mocks/hash_like.rb +0 -10
- data/spec/support/mocks/mock_probe.rb +0 -13
- data/spec/support/mocks/puma_mock.rb +0 -43
- data/spec/support/shared_examples/instrument.rb +0 -48
- data/spec/support/stubs/appsignal/loaders/loader_stub.rb +0 -7
- data/spec/support/stubs/delayed_job.rb +0 -0
- data/spec/support/stubs/sidekiq/api.rb +0 -4
- data/spec/support/testing.rb +0 -194
- data/support/bundler_wrapper +0 -12
- data/support/install_deps +0 -33
@@ -1,62 +0,0 @@
|
|
1
|
-
name: "Create release from tag"
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
tags:
|
6
|
-
- "v**"
|
7
|
-
|
8
|
-
permissions:
|
9
|
-
contents: write
|
10
|
-
actions: write
|
11
|
-
|
12
|
-
jobs:
|
13
|
-
release:
|
14
|
-
name: "Create release"
|
15
|
-
runs-on: ubuntu-latest
|
16
|
-
env:
|
17
|
-
PACKAGE_NAME: "Ruby gem"
|
18
|
-
CHANGELOG_CATEGORY: "Ruby"
|
19
|
-
CHANGELOG_LINK: "https://github.com/appsignal/appsignal-ruby/blob/main/CHANGELOG.md"
|
20
|
-
steps:
|
21
|
-
- name: Checkout repository at tag
|
22
|
-
uses: actions/checkout@v4
|
23
|
-
with:
|
24
|
-
ref: "${{ github.ref }}"
|
25
|
-
|
26
|
-
- name: Get tag name
|
27
|
-
run: |
|
28
|
-
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
29
|
-
|
30
|
-
- name: Get changelog contents from tag
|
31
|
-
run: |
|
32
|
-
# Use sed to remove everything after "-----BEGIN PGP SIGNATURE-----" if it's present
|
33
|
-
# and also always remove the last line of the git show output
|
34
|
-
git show --format=oneline --no-color --no-patch "${{ env.TAG_NAME }}" \
|
35
|
-
| sed '1,2d' \
|
36
|
-
| sed '$d' \
|
37
|
-
| sed '/-----BEGIN PGP SIGNATURE-----/,$d' \
|
38
|
-
> CHANGELOG_TEXT.txt
|
39
|
-
|
40
|
-
echo "" >> CHANGELOG_TEXT.txt
|
41
|
-
echo "" >> CHANGELOG_TEXT.txt
|
42
|
-
|
43
|
-
TAG_NAME_FOR_LINK=$(echo "${{ env.TAG_NAME }}" | sed 's/^v//' | tr -d '.')
|
44
|
-
echo "View the [$PACKAGE_NAME ${{ env.TAG_NAME }} changelog]($CHANGELOG_LINK#$TAG_NAME_FOR_LINK) for more information." >> CHANGELOG_TEXT.txt
|
45
|
-
|
46
|
-
- name: Submit changelog entry
|
47
|
-
run: |
|
48
|
-
# Prepare JSON payload using jq to ensure proper escaping
|
49
|
-
payload=$(jq -n \
|
50
|
-
--arg title "$PACKAGE_NAME ${{ env.TAG_NAME }}" \
|
51
|
-
--arg category "$CHANGELOG_CATEGORY" \
|
52
|
-
--arg version "$(echo "${{ env.TAG_NAME }}" | sed 's/^v//')" \
|
53
|
-
--arg changelog "$(cat CHANGELOG_TEXT.txt)" \
|
54
|
-
--arg assignee "${{ github.actor }}" \
|
55
|
-
'{ref: "main", inputs: {title: $title, category: $category, version: $version, changelog: $changelog, assignee: $assignee}}')
|
56
|
-
|
57
|
-
curl -X POST \
|
58
|
-
-H "Authorization: token ${{ secrets.INTEGRATIONS_CHANGELOG_TOKEN }}" \
|
59
|
-
-H "Accept: application/vnd.github+json" \
|
60
|
-
--fail-with-body \
|
61
|
-
https://api.github.com/repos/appsignal/appsignal.com/actions/workflows/102125282/dispatches \
|
62
|
-
-d "$payload"
|
data/.gitignore
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
*.rbc
|
2
|
-
*.sassc
|
3
|
-
.sass-cache
|
4
|
-
capybara-*.html
|
5
|
-
*.log
|
6
|
-
/doc
|
7
|
-
/.bundle
|
8
|
-
/vendor/bundle
|
9
|
-
/tmp/*
|
10
|
-
/db/*.sqlite3
|
11
|
-
/public/system/*
|
12
|
-
/coverage/
|
13
|
-
/spec/examples.txt
|
14
|
-
/spec/tmp
|
15
|
-
/spec/support/project_fixture/log/*.log
|
16
|
-
**.orig
|
17
|
-
rerun.txt
|
18
|
-
pickle-email-*.html
|
19
|
-
*.gem
|
20
|
-
Gemfile.lock
|
21
|
-
gemfiles/*.lock
|
22
|
-
.DS_Store
|
23
|
-
.ruby-version
|
24
|
-
bundle_and_spec_all_*
|
25
|
-
ext/libappsignal.*
|
26
|
-
ext/appsignal-agent
|
27
|
-
ext/._appsignal-agent
|
28
|
-
ext/appsignal.h
|
29
|
-
ext/appsignal.version
|
30
|
-
ext/Makefile
|
31
|
-
ext/*.bundle
|
32
|
-
ext/*.o
|
33
|
-
ext/*.so
|
34
|
-
ext/*.report
|
35
|
-
pkg/
|
data/.gitmodules
DELETED
data/.rspec
DELETED
data/.yardopts
DELETED
data/benchmark.rake
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Run using: rake --rakefile benchmark.rake [tasks]
|
4
|
-
|
5
|
-
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), "lib"))
|
6
|
-
|
7
|
-
require "benchmark"
|
8
|
-
require "benchmark/ips"
|
9
|
-
require "appsignal"
|
10
|
-
|
11
|
-
def process_rss
|
12
|
-
`ps -o rss= -p #{Process.pid}`.to_i
|
13
|
-
end
|
14
|
-
|
15
|
-
GC.disable
|
16
|
-
|
17
|
-
task :default => :"benchmark:all"
|
18
|
-
|
19
|
-
namespace :benchmark do
|
20
|
-
task :all => [:memory_inactive, :memory_active, :ips]
|
21
|
-
|
22
|
-
task :memory_inactive do
|
23
|
-
puts "Memory benchmark with AppSignal off"
|
24
|
-
ENV["APPSIGNAL_PUSH_API_KEY"] = nil
|
25
|
-
run_benchmark
|
26
|
-
end
|
27
|
-
|
28
|
-
task :memory_active do
|
29
|
-
puts "Memory benchmark with AppSignal on"
|
30
|
-
ENV["APPSIGNAL_PUSH_API_KEY"] = "something"
|
31
|
-
run_benchmark
|
32
|
-
end
|
33
|
-
|
34
|
-
task :ips do
|
35
|
-
puts "Iterations per second benchmark"
|
36
|
-
start_agent
|
37
|
-
Benchmark.ips do |x|
|
38
|
-
x.config(
|
39
|
-
:time => 5,
|
40
|
-
:warmup => 2
|
41
|
-
)
|
42
|
-
|
43
|
-
x.report("monitor transaction inactive") do |times|
|
44
|
-
ENV["APPSIGNAL_PUSH_API_KEY"] = nil
|
45
|
-
|
46
|
-
monitor_transaction("transaction_#{times}")
|
47
|
-
end
|
48
|
-
|
49
|
-
x.report("monitor transaction active") do |times|
|
50
|
-
ENV["APPSIGNAL_PUSH_API_KEY"] = "something"
|
51
|
-
|
52
|
-
monitor_transaction("transaction_#{times}")
|
53
|
-
end
|
54
|
-
|
55
|
-
x.compare!
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def start_agent
|
61
|
-
Appsignal.configure(:production) do |config|
|
62
|
-
config.endpoint = "http://localhost:8080"
|
63
|
-
end
|
64
|
-
Appsignal.start
|
65
|
-
end
|
66
|
-
|
67
|
-
def monitor_transaction(transaction_id)
|
68
|
-
transaction = Appsignal::Transaction.new(
|
69
|
-
Appsignal::Transaction::HTTP_REQUEST,
|
70
|
-
:id => transaction_id
|
71
|
-
)
|
72
|
-
Appsignal::Transaction.set_current_transaction(transaction)
|
73
|
-
transaction.set_action("HomeController#show")
|
74
|
-
transaction.add_params(:id => 1)
|
75
|
-
|
76
|
-
Appsignal.instrument("process_action.action_controller") do
|
77
|
-
Appsignal.instrument_sql(
|
78
|
-
"sql.active_record",
|
79
|
-
nil,
|
80
|
-
"SELECT `users`.* FROM `users` WHERE `users`.`id` = ?"
|
81
|
-
)
|
82
|
-
10.times do
|
83
|
-
Appsignal.instrument_sql(
|
84
|
-
"sql.active_record",
|
85
|
-
nil,
|
86
|
-
"SELECT `todos`.* FROM `todos` WHERE `todos`.`id` = ?"
|
87
|
-
)
|
88
|
-
end
|
89
|
-
|
90
|
-
Appsignal.instrument(
|
91
|
-
"render_template.action_view",
|
92
|
-
"app/views/home/show.html.erb"
|
93
|
-
) do
|
94
|
-
5.times do
|
95
|
-
Appsignal.instrument(
|
96
|
-
"render_partial.action_view",
|
97
|
-
"app/views/home/_piece.html.erb"
|
98
|
-
) do
|
99
|
-
3.times do
|
100
|
-
Appsignal.instrument("cache.read")
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
Appsignal::Transaction.complete_current!
|
108
|
-
end
|
109
|
-
|
110
|
-
def run_benchmark
|
111
|
-
no_transactions = (ENV["NO_TRANSACTIONS"] || 100_000).to_i
|
112
|
-
no_threads = (ENV["NO_THREADS"] || 1).to_i
|
113
|
-
|
114
|
-
total_objects = ObjectSpace.count_objects[:TOTAL]
|
115
|
-
puts "Initializing, currently #{total_objects} objects"
|
116
|
-
puts "RSS: #{process_rss}"
|
117
|
-
|
118
|
-
start_agent
|
119
|
-
puts "Appsignal #{Appsignal.active? ? "active" : "not active"}"
|
120
|
-
|
121
|
-
threads = []
|
122
|
-
puts "Running #{no_transactions} normal transactions in #{no_threads} threads"
|
123
|
-
puts(Benchmark.measure do
|
124
|
-
no_threads.times do
|
125
|
-
thread = Thread.new do
|
126
|
-
no_transactions.times do |i|
|
127
|
-
monitor_transaction("transaction_#{i}")
|
128
|
-
end
|
129
|
-
end
|
130
|
-
thread.abort_on_exception = true
|
131
|
-
threads << thread
|
132
|
-
end
|
133
|
-
threads.each(&:join)
|
134
|
-
puts "Finished"
|
135
|
-
end)
|
136
|
-
|
137
|
-
puts "Done, currently #{ObjectSpace.count_objects[:TOTAL] - total_objects} objects created"
|
138
|
-
puts "RSS: #{process_rss}"
|
139
|
-
end
|
data/gemfiles/grape.gemfile
DELETED
data/gemfiles/hanami-2.0.gemfile
DELETED
data/gemfiles/hanami-2.1.gemfile
DELETED
data/gemfiles/http5.gemfile
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
4
|
-
gem "rack", "~> 1.6" if ruby_version < Gem::Version.new("2.3.0")
|
5
|
-
|
6
|
-
# Fix install issue for jruby on gem 3.1.8.
|
7
|
-
# No java stub is published.
|
8
|
-
gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java"
|
9
|
-
|
10
|
-
gemspec :path => "../"
|
data/gemfiles/padrino.gemfile
DELETED
data/gemfiles/psych-3.gemfile
DELETED
data/gemfiles/psych-4.gemfile
DELETED
data/gemfiles/que.gemfile
DELETED
data/gemfiles/rails-6.0.gemfile
DELETED
data/gemfiles/rails-6.1.gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "net-smtp", :require => false
|
4
|
-
gem "rails", "~> 6.1.0"
|
5
|
-
gem "sidekiq"
|
6
|
-
|
7
|
-
# Fix install issue for jruby on gem 3.1.8.
|
8
|
-
# No java stub is published.
|
9
|
-
gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java"
|
10
|
-
|
11
|
-
gemspec :path => "../"
|
data/gemfiles/rails-7.0.gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "~> 7.0.1"
|
4
|
-
gem "rake", "> 12.2"
|
5
|
-
gem "sidekiq"
|
6
|
-
|
7
|
-
# Fix install issue for jruby on gem 3.1.8.
|
8
|
-
# No java stub is published.
|
9
|
-
gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java"
|
10
|
-
|
11
|
-
gemspec :path => "../"
|
data/gemfiles/rails-7.1.gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "~> 7.1.0"
|
4
|
-
gem "rake", "> 12.2"
|
5
|
-
gem "sidekiq"
|
6
|
-
|
7
|
-
# Fix install issue for jruby on gem 3.1.8.
|
8
|
-
# No java stub is published.
|
9
|
-
gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java"
|
10
|
-
|
11
|
-
gemspec :path => "../"
|
data/gemfiles/rails-7.2.gemfile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "~> 7.2.0"
|
4
|
-
gem "rake", "> 12.2"
|
5
|
-
gem "sidekiq"
|
6
|
-
|
7
|
-
# Fix install issue for jruby on gem 3.1.8.
|
8
|
-
# No java stub is published.
|
9
|
-
gem "bigdecimal", "3.1.7" if RUBY_PLATFORM == "java"
|
10
|
-
|
11
|
-
gemspec :path => "../"
|
data/gemfiles/redis-4.gemfile
DELETED
data/gemfiles/redis-5.gemfile
DELETED
data/gemfiles/resque-2.gemfile
DELETED
data/gemfiles/sequel.gemfile
DELETED
data/gemfiles/sinatra.gemfile
DELETED
data/mono.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
repo: "https://github.com/appsignal/appsignal-ruby"
|
4
|
-
bootstrap:
|
5
|
-
post:
|
6
|
-
- "rake extension:install"
|
7
|
-
clean:
|
8
|
-
post:
|
9
|
-
- "bundle exec rake extension:clean"
|
10
|
-
- "rm -rf pkg"
|
11
|
-
build:
|
12
|
-
command: "bundle exec rake build:all"
|
13
|
-
publish:
|
14
|
-
gem_files_dir: pkg/
|
15
|
-
test:
|
16
|
-
command: "bundle exec rake test"
|
data/spec/.rubocop.yml
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
describe Appsignal::AuthCheck do
|
2
|
-
let(:config) { build_config }
|
3
|
-
let(:auth_check) { Appsignal::AuthCheck.new(config) }
|
4
|
-
let(:auth_url) do
|
5
|
-
query = build_uri_query_string(
|
6
|
-
:api_key => config[:push_api_key],
|
7
|
-
:environment => config.env,
|
8
|
-
:gem_version => Appsignal::VERSION,
|
9
|
-
:hostname => config[:hostname],
|
10
|
-
:name => config[:name]
|
11
|
-
)
|
12
|
-
|
13
|
-
URI(config[:endpoint]).tap do |uri|
|
14
|
-
uri.path = "/1/auth"
|
15
|
-
uri.query = query
|
16
|
-
end.to_s
|
17
|
-
end
|
18
|
-
let(:stubbed_request) do
|
19
|
-
WebMock.stub_request(:post, auth_url).with(:body => "{}")
|
20
|
-
end
|
21
|
-
|
22
|
-
def build_uri_query_string(hash)
|
23
|
-
URI.encode_www_form(hash)
|
24
|
-
end
|
25
|
-
|
26
|
-
describe "#perform" do
|
27
|
-
subject { auth_check.perform }
|
28
|
-
|
29
|
-
context "when performing a request against the push api" do
|
30
|
-
before { stubbed_request.to_return(:status => 200) }
|
31
|
-
|
32
|
-
it "returns status code" do
|
33
|
-
is_expected.to eq("200")
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
context "when encountering an exception" do
|
38
|
-
before { stubbed_request.to_timeout }
|
39
|
-
|
40
|
-
it "raises an error" do
|
41
|
-
expect { subject }.to raise_error(Net::OpenTimeout)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe "#perform_with_result" do
|
47
|
-
subject { auth_check.perform_with_result }
|
48
|
-
|
49
|
-
context "when successful response" do
|
50
|
-
before { stubbed_request.to_return(:status => 200) }
|
51
|
-
|
52
|
-
it "returns success tuple" do
|
53
|
-
is_expected.to eq ["200", "AppSignal has confirmed authorization!"]
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
context "when unauthorized response" do
|
58
|
-
before { stubbed_request.to_return(:status => 401) }
|
59
|
-
|
60
|
-
it "returns unauthorirzed tuple" do
|
61
|
-
is_expected.to eq ["401", "API key not valid with AppSignal..."]
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
context "when unrecognized response" do
|
66
|
-
before { stubbed_request.to_return(:status => 500) }
|
67
|
-
|
68
|
-
it "returns an error tuple" do
|
69
|
-
is_expected.to eq ["500", "Could not confirm authorization: 500"]
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
context "when encountering an exception" do
|
74
|
-
before { stubbed_request.to_timeout }
|
75
|
-
|
76
|
-
it "returns an error tuple" do
|
77
|
-
is_expected.to eq [
|
78
|
-
nil,
|
79
|
-
"Something went wrong while trying to authenticate with AppSignal: execution expired"
|
80
|
-
]
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|