appsignal 4.5.17 → 4.6.0

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/CLAUDE.md +177 -0
  4. data/README.md +17 -0
  5. data/appsignal.gemspec +1 -0
  6. data/build_matrix.yml +29 -0
  7. data/lib/appsignal/auth_check.rb +3 -3
  8. data/lib/appsignal/check_in/cron.rb +1 -1
  9. data/lib/appsignal/check_in/event.rb +1 -1
  10. data/lib/appsignal/check_in/scheduler.rb +3 -1
  11. data/lib/appsignal/check_in.rb +9 -6
  12. data/lib/appsignal/cli/diagnose.rb +1 -1
  13. data/lib/appsignal/cli.rb +1 -1
  14. data/lib/appsignal/config.rb +231 -30
  15. data/lib/appsignal/custom_marker.rb +3 -3
  16. data/lib/appsignal/environment.rb +7 -1
  17. data/lib/appsignal/event_formatter/action_view/render_formatter.rb +1 -1
  18. data/lib/appsignal/event_formatter/active_record/instantiation_formatter.rb +1 -1
  19. data/lib/appsignal/event_formatter/active_record/sql_formatter.rb +1 -1
  20. data/lib/appsignal/event_formatter/elastic_search/search_formatter.rb +1 -1
  21. data/lib/appsignal/event_formatter/faraday/request_formatter.rb +1 -1
  22. data/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb +1 -1
  23. data/lib/appsignal/event_formatter/rom/sql_formatter.rb +1 -1
  24. data/lib/appsignal/event_formatter/sequel/sql_formatter.rb +1 -1
  25. data/lib/appsignal/event_formatter/view_component/render_formatter.rb +1 -1
  26. data/lib/appsignal/event_formatter.rb +41 -3
  27. data/lib/appsignal/extension.rb +1 -1
  28. data/lib/appsignal/garbage_collection.rb +1 -1
  29. data/lib/appsignal/helpers/instrumentation.rb +82 -35
  30. data/lib/appsignal/helpers/metrics.rb +12 -9
  31. data/lib/appsignal/hooks/action_cable.rb +1 -1
  32. data/lib/appsignal/hooks/action_mailer.rb +1 -0
  33. data/lib/appsignal/hooks/active_job.rb +1 -1
  34. data/lib/appsignal/hooks/active_support_notifications.rb +1 -1
  35. data/lib/appsignal/hooks/at_exit.rb +1 -1
  36. data/lib/appsignal/hooks/celluloid.rb +1 -1
  37. data/lib/appsignal/hooks/data_mapper.rb +1 -1
  38. data/lib/appsignal/hooks/delayed_job.rb +1 -1
  39. data/lib/appsignal/hooks/dry_monitor.rb +1 -1
  40. data/lib/appsignal/hooks/excon.rb +1 -1
  41. data/lib/appsignal/hooks/gvl.rb +1 -1
  42. data/lib/appsignal/hooks/http.rb +1 -1
  43. data/lib/appsignal/hooks/mongo_ruby_driver.rb +1 -1
  44. data/lib/appsignal/hooks/mri.rb +1 -1
  45. data/lib/appsignal/hooks/net_http.rb +1 -1
  46. data/lib/appsignal/hooks/ownership.rb +1 -1
  47. data/lib/appsignal/hooks/passenger.rb +1 -1
  48. data/lib/appsignal/hooks/puma.rb +1 -1
  49. data/lib/appsignal/hooks/que.rb +1 -1
  50. data/lib/appsignal/hooks/rake.rb +1 -1
  51. data/lib/appsignal/hooks/redis.rb +1 -1
  52. data/lib/appsignal/hooks/redis_client.rb +1 -1
  53. data/lib/appsignal/hooks/resque.rb +1 -1
  54. data/lib/appsignal/hooks/sequel.rb +2 -1
  55. data/lib/appsignal/hooks/shoryuken.rb +1 -1
  56. data/lib/appsignal/hooks/sidekiq.rb +1 -0
  57. data/lib/appsignal/hooks/unicorn.rb +1 -1
  58. data/lib/appsignal/hooks/webmachine.rb +1 -1
  59. data/lib/appsignal/hooks.rb +5 -3
  60. data/lib/appsignal/integrations/action_cable.rb +1 -1
  61. data/lib/appsignal/integrations/active_support_notifications.rb +1 -1
  62. data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +1 -1
  63. data/lib/appsignal/integrations/data_mapper.rb +1 -1
  64. data/lib/appsignal/integrations/delayed_job_plugin.rb +1 -1
  65. data/lib/appsignal/integrations/dry_monitor.rb +1 -1
  66. data/lib/appsignal/integrations/excon.rb +1 -1
  67. data/lib/appsignal/integrations/http.rb +1 -1
  68. data/lib/appsignal/integrations/mongo_ruby_driver.rb +1 -1
  69. data/lib/appsignal/integrations/net_http.rb +1 -1
  70. data/lib/appsignal/integrations/object.rb +18 -2
  71. data/lib/appsignal/integrations/ownership.rb +1 -1
  72. data/lib/appsignal/integrations/puma.rb +1 -1
  73. data/lib/appsignal/integrations/que.rb +1 -1
  74. data/lib/appsignal/integrations/railtie.rb +2 -2
  75. data/lib/appsignal/integrations/rake.rb +2 -2
  76. data/lib/appsignal/integrations/redis.rb +1 -1
  77. data/lib/appsignal/integrations/redis_client.rb +1 -1
  78. data/lib/appsignal/integrations/resque.rb +2 -2
  79. data/lib/appsignal/integrations/shoryuken.rb +1 -1
  80. data/lib/appsignal/integrations/sidekiq.rb +3 -3
  81. data/lib/appsignal/integrations/unicorn.rb +1 -1
  82. data/lib/appsignal/integrations/webmachine.rb +1 -1
  83. data/lib/appsignal/internal_errors.rb +2 -2
  84. data/lib/appsignal/loaders.rb +1 -1
  85. data/lib/appsignal/logger.rb +36 -19
  86. data/lib/appsignal/marker.rb +1 -1
  87. data/lib/appsignal/probes/gvl.rb +4 -3
  88. data/lib/appsignal/probes/helpers.rb +1 -1
  89. data/lib/appsignal/probes/mri.rb +3 -3
  90. data/lib/appsignal/probes/sidekiq.rb +4 -3
  91. data/lib/appsignal/probes.rb +20 -15
  92. data/lib/appsignal/rack.rb +1 -1
  93. data/lib/appsignal/sample_data.rb +31 -12
  94. data/lib/appsignal/span.rb +1 -1
  95. data/lib/appsignal/system.rb +9 -8
  96. data/lib/appsignal/transaction.rb +72 -52
  97. data/lib/appsignal/transmitter.rb +1 -1
  98. data/lib/appsignal/utils.rb +1 -1
  99. data/lib/appsignal/version.rb +2 -1
  100. data/lib/appsignal.rb +22 -14
  101. data/lib/puma/plugin/appsignal.rb +1 -1
  102. data/sig/appsignal.rbi +2599 -0
  103. data/sig/appsignal.rbs +2420 -0
  104. metadata +20 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b41543a5c8a4ab168f9e25cb08cb21cac1f2feab07e2ee94948cb3b5e4a93de
4
- data.tar.gz: 27cd215ac772b9df1fd0851b0b7cbad6c201d273ddc9d416cf739b928c632c0a
3
+ metadata.gz: f788b7bfb3d2b44efa664bc031df2a2af56085daef2ff224144d6b06e96912ea
4
+ data.tar.gz: 8600017362cafa764b5ed3f8dbfc41e083b110bcc49374fc66a9a3583ca12f5a
5
5
  SHA512:
6
- metadata.gz: 972b6a1e047559e8b5821e6e3749e25b22226f1a3064afbbe1d75f72d5f91882bcb2eee7dab8f7098a58c4419e272e0cb91e8b5ce74f94468f7942b96400502d
7
- data.tar.gz: 257ffe63d397bd648fefbf055fd5955851a6a95f605f810c5e2fc6cb0aef5bc5584b34487a4d0625dec08e73f1fd77ca15840a5d2fbd5d669f3c4c0f482817de
6
+ metadata.gz: a22051b87cae3d4f9d93f34b0cc41765feba84b7eccf8842c178954bf6ba0dbe6977222646c860f0afdf83a26b61ca493728255113455aa1fe49e151604cfc66
7
+ data.tar.gz: 442959e2bb59a79878852cb1397b477b6100645f95a98a121ce0c83d6d8aea7cfb8d9e78a6ce8235d5482a625a3e4b19495b3da1ac0b3e9029ec0052801ae668
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 4.6.0
4
+
5
+ _Published on 2025-07-29._
6
+
7
+ ### Added
8
+
9
+ - Add Sorbet and RBS type signatures for the gem's public APIs. If your editor supports showing type signatures, they will now show up in for the AppSignal Ruby gem. (minor [9ed372fc](https://github.com/appsignal/appsignal-ruby/commit/9ed372fc7819eff2fd73aa287b4d0018e008d0da), [4c9118f7](https://github.com/appsignal/appsignal-ruby/commit/4c9118f7bf36475146ed9309e0511c176058efb6))
10
+ - When a deployment tool (Capistrano, Hatchbox.io) provides the `REVISION` file in the deployed application, AppSignal will now use that to set the revision config. (minor [34e4aee5](https://github.com/appsignal/appsignal-ruby/commit/34e4aee5f3010f122501470bad06e02e7aef7ef2), [4c9118f7](https://github.com/appsignal/appsignal-ruby/commit/4c9118f7bf36475146ed9309e0511c176058efb6))
11
+
12
+ ### Changed
13
+
14
+ - Improve the YARD documentation for public APIs. This will make the documentation clearer and more useful for developers using the Ruby gem. Private APIs have been hidden from the generated output. (patch [989dc495](https://github.com/appsignal/appsignal-ruby/commit/989dc495242a656278186e47b68e41fa785dbae2), [4c9118f7](https://github.com/appsignal/appsignal-ruby/commit/4c9118f7bf36475146ed9309e0511c176058efb6))
15
+ - When an error occurs while initializing AppSignal or when running a probe, use the error log level to log the error's backtrace. (patch [390f4489](https://github.com/appsignal/appsignal-ruby/commit/390f448991e52904d993c2139f4b11642003c345), [385b0262](https://github.com/appsignal/appsignal-ruby/commit/385b0262d1001108bdac07a95b85e90bf6ccde5c), [178bafc2](https://github.com/appsignal/appsignal-ruby/commit/178bafc23888e38b42f58fbaa17b1c28af060f5e))
16
+
17
+ ### Fixed
18
+
19
+ - When a Hash-like value (such as `ActiveSupport::HashWithIndifferentAccess` or `Sinatra::IndifferentHash`) is passed to a transaction helper (such as `add_params`, `add_session_data`, ...) it is now converted to a Ruby `Hash` before setting it as the value or merging it with the existing value. This allows Hash-like objects to be merged, instead of logging a warning and only storing the new value.
20
+
21
+ ```ruby
22
+ # Example scenario
23
+ Appsignal.add_params(:key1 => { :abc => "value" })
24
+ Appsignal.add_params(ActiveSupport::HashWithIndifferentAccess.new(:key2 => { :def => "value" }))
25
+
26
+ # Params
27
+ {
28
+ :key1 => { :abc => "value" },
29
+ # Keys from HashWithIndifferentAccess are stored as Strings
30
+ "key2" => { "def" => "value" }
31
+ }
32
+ ```
33
+
34
+ (patch [3155cd48](https://github.com/appsignal/appsignal-ruby/commit/3155cd482e1c708d276eb6eb9db158e551116511), [b201e359](https://github.com/appsignal/appsignal-ruby/commit/b201e35917d61f916b59f1809d99bb196d5f1a1c))
35
+
3
36
  ## 4.5.17
4
37
 
5
38
  _Published on 2025-07-01._
data/CLAUDE.md ADDED
@@ -0,0 +1,177 @@
1
+ # AppSignal Ruby Gem
2
+
3
+ This is the Ruby gem for AppSignal, an application performance monitoring (APM) service.
4
+
5
+ ## Project Structure
6
+
7
+ Directories:
8
+
9
+ - `bin/` - Directory with executables that can be called once the Ruby gem is installed
10
+ - `lib/` - Main library code
11
+ - `appsignal.rb` - Main module of the Ruby gem
12
+ - `appsignal/` - Library code
13
+ - `capistrano.rb` - Capistrano integration
14
+ - `check_in/` - Check-in functionality
15
+ - `cli/` - Command Line Interface modules
16
+ - `config.rb` - Configuration management
17
+ - `event_formatter/` - Event formatting for different frameworks
18
+ - `extension.rb` - C extension module, extended by the C extension
19
+ - `extension/` - C extension modules in the Ruby gem
20
+ - `hooks/` - Ruby gem hooks and may contain integration code
21
+ - `integrations/` - Ruby gem integrations, loaded by the hooks
22
+ - `loaders/` - Ruby gem loaders, integrations manually loaded by applications
23
+ - `logger.rb` - Logger functionality
24
+ - `probes/` - Minutely probes
25
+ - `rack/` - Rack middleware for various Ruby gems
26
+ - `span.rb` - Tracing span API (private API)
27
+ - `transaction.rb` - Tracing transaction API
28
+ - `utils/` - Utility modules
29
+ - `puma/plugin/appsignal.rb` - AppSignal Puma plugin
30
+ - `sequel/extensions/appsignal_integration.rb` - AppSignal Sequel plugin placeholder
31
+ - `ext/` - Native C extension
32
+ - `appsignal_extension.c` - Main C extension
33
+ - `base.rb` - Extension installation script helpers shared between the MRI Ruby and JRuby installers
34
+ - `extconf.rb` - Extension installation script for MRI Ruby
35
+ - `Rakefile` - Extension installation script for JRuby
36
+ - `agent.rb` - Agent bootstrapping
37
+ - `spec/` - RSpec test suite
38
+ - `lib/` - Unit tests
39
+ - `integration/` - Integration tests
40
+ - `support/` - Test helpers, matchers, shared examples, stubs and fixtures
41
+ - `gemfiles/` - Gemfile variations used for testing
42
+ - `resources/` - Configuration templates
43
+ - `script/` - Development scripts
44
+
45
+ Files:
46
+
47
+ - `Gemfile`: Additional development dependencies
48
+ - `Rakefile`: Build and development tasks
49
+ - `appsignal.gemspec`: Gem specification
50
+ - `build_matrix.yml`: Build matrix configuration
51
+ - `mono.yml`: [Mono](https://github.com/appsignal/mono/) release configuration
52
+
53
+ ## Key Components
54
+
55
+ ### Core Library Files (`lib/`)
56
+
57
+ - `appsignal.rb`: Main Ruby gem module with the public API
58
+ - `appsignal/helpers/instrumentation.rb`: Tracing instrumentation helpers
59
+ - `appsignal/helpers/metrics.rb`: Metrics helpers
60
+ - `appsignal/config.rb`: Configuration management and validation
61
+ - `appsignal/transaction.rb`: Transaction API
62
+ - `appsignal/extension.rb`: Interface to native C extension
63
+ - `appsignal/hooks/`: Framework-specific instrumentation hooks
64
+ - `appsignal/integrations/`: Framework integrations (Rails, Sidekiq, etc.)
65
+ - `appsignal/rack/`: Rack middleware for web frameworks
66
+
67
+ ### Native Extension (`ext/`)
68
+
69
+ - `appsignal_extension.c`: C extension for performance-critical operations
70
+ - `extconf.rb`: Extension build configuration
71
+ - `agent.rb`: Agent initialization and management
72
+
73
+ ### Framework Support
74
+
75
+ The gem supports numerous web frameworks like:
76
+
77
+ - Grape
78
+ - Hanami
79
+ - Padrino
80
+ - Rails, including:
81
+ - Action Cable
82
+ - Active Support Notifications
83
+ - Active Job, and all adapters
84
+ - Action Mailer
85
+ - Sinatra
86
+ - Webmachine
87
+
88
+ Background job libraries like:
89
+
90
+ - DelayedJob
91
+ - Resque
92
+ - Shoryuken
93
+ - Sidekiq
94
+
95
+ Database drivers like:
96
+
97
+ - DataMapper
98
+ - MongoDB
99
+ - Redis and redis-client
100
+ - Sequel
101
+
102
+ And gems like:
103
+
104
+ - Capistrano
105
+ - Excon
106
+ - Net::HTTP
107
+ - Ownership
108
+ - Passenger
109
+ - Puma
110
+ - Rake
111
+ - Unicorn
112
+
113
+ ## Development Commands
114
+
115
+ ### Setup
116
+
117
+ ```bash
118
+ # Install dependencies
119
+ bundle install
120
+
121
+ # Install the extension
122
+ rake extension:install
123
+ ```
124
+
125
+ ### Testing
126
+
127
+ ```bash
128
+ # Run the test suite
129
+ bundle exec rspec
130
+
131
+ # Run tests for specific framework
132
+ BUNDLE_GEMFILE=gemfiles/<gemfile>.gemfile bundle exec rspec
133
+ ```
134
+
135
+ ### Extension development
136
+
137
+ ```bash
138
+ # Install or reinstall the extension
139
+ rake extension:install
140
+
141
+ # For JRuby
142
+ cd ext && rake
143
+ ```
144
+
145
+ ## File organization
146
+
147
+ ### Configuration files
148
+
149
+ ### Testing structure
150
+
151
+ - `spec/lib/`: Unit tests mirroring `lib/` structure
152
+ - `spec/integration/`: Integration and end-to-end tests
153
+ - `spec/support/`: Test helpers, mocks, and fixtures
154
+
155
+ ### Continuous integration
156
+
157
+ - `build_matrix.yml`: CI build matrix configuration
158
+ - `.github/workflows/ci.yml`: GitHub Actions workflow (auto-generated)
159
+
160
+ Update the generated `.github/workflows/ci.yml` file by running the following command:
161
+
162
+ ```bash
163
+ rake build_matrix:github:generate
164
+ ```
165
+
166
+ The script to generate the `.github/workflows/ci.yml` file is part of the `Rakefile`.
167
+
168
+ ## Important Notes
169
+
170
+ - The gem includes both Ruby and Java (JRuby) versions.
171
+ - Native C extension provides performance-critical functionality.
172
+ - Extensive test matrix covers multiple Ruby versions and frameworks.
173
+ - Uses mono for automated releases and changelog management.
174
+
175
+ ## Documentation
176
+
177
+ The Ruby gem is documented using YARD and is paired with documentation on the AppSignal documentation website at: https://docs.appsignal.com/ruby.html
data/README.md CHANGED
@@ -214,6 +214,23 @@ Note that some specs depend on certain other gems to run and if they are not
214
214
  loaded RSpec will not run them. See also [Testing with other
215
215
  gems](#testing-with-other-gems).
216
216
 
217
+ #### Type Signature Validation
218
+
219
+ The gem includes type signatures for both Sorbet and RBS, automatically generated from YARD documentation using the [sord gem](https://github.com/AaronC81/sord). To generate and validate these signatures:
220
+
221
+ ```bash
222
+ # Generate Sorbet .rbi and RBS .rbs signatures
223
+ script/generate_signatures
224
+
225
+ # Validate Sorbet .rbi files syntax (this is done on the CI)
226
+ find sig -name "*.rbi" -exec ruby -c {} \;
227
+
228
+ # Validate RBS .rbs files syntax (this is done on the CI)
229
+ bundle exec rbs parse sig/appsignal.rbs
230
+ ```
231
+
232
+ These type signatures provide enhanced IDE support and static type checking for users of the AppSignal gem. The signatures cover all public APIs and are automatically generated and validated in CI.
233
+
217
234
  #### Testing with other gems
218
235
 
219
236
  AppSignal runs in many different configurations. To replicate these
data/appsignal.gemspec CHANGED
@@ -64,6 +64,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
64
64
  gem.add_development_dependency "rake", ">= 12"
65
65
  gem.add_development_dependency "rspec", "~> 3.8"
66
66
  gem.add_development_dependency "rubocop", "1.64.1"
67
+ gem.add_development_dependency("sord") unless RUBY_PLATFORM == "java"
67
68
  gem.add_development_dependency "timecop"
68
69
  gem.add_development_dependency "webmock"
69
70
  gem.add_development_dependency "yard", ">= 0.9.20"
data/build_matrix.yml CHANGED
@@ -36,6 +36,35 @@ github:
36
36
  - name: "Run RuboCop"
37
37
  run: bundle exec rubocop
38
38
 
39
+ validate-signatures:
40
+ name: "Type signature validation"
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - uses: ruby/setup-ruby@v1
45
+ with:
46
+ ruby-version: "3.3"
47
+ bundler-cache: true
48
+ - name: "Generate fresh signatures and check sync"
49
+ run: |
50
+ # Generate fresh signatures
51
+ script/generate_signatures
52
+
53
+ # Check if any signature files changed
54
+ if [ -n "$(git status --porcelain sig/)" ]; then
55
+ echo "❌ ERROR: Signatures are out of sync with YARD documentation"
56
+ echo "The following files have changes:"
57
+ git status --porcelain sig/
58
+ echo "Please run 'script/generate_signatures' to update them"
59
+ exit 1
60
+ fi
61
+
62
+ echo "✅ Signatures are in sync with YARD documentation"
63
+ - name: "Validate Sorbet .rbi files"
64
+ run: find sig -name "*.rbi" -exec ruby -c {} \;
65
+ - name: "Validate RBS .rbs files"
66
+ run: bundle exec rbs parse sig/appsignal.rbs
67
+
39
68
  validation:
40
69
  name: "Validation of CI"
41
70
  runs-on: ubuntu-latest
@@ -14,7 +14,7 @@ module Appsignal
14
14
  #
15
15
  # @!attribute [r] config
16
16
  # @return [Appsignal::Config] config to use in the authentication request.
17
- # @api private
17
+ # @!visibility private
18
18
  class AuthCheck
19
19
  # Path used on the AppSignal Push API
20
20
  # https://push.appsignal.com/1/auth
@@ -37,7 +37,7 @@ module Appsignal
37
37
  # Perform push api validation request and return a descriptive response
38
38
  # tuple.
39
39
  #
40
- # @return [Array<String/nil, String>] response tuple.
40
+ # @return [Array<String, String>] response tuple.
41
41
  # - First value is the response status code.
42
42
  # - Second value is a description of the response and the exception error
43
43
  # message if an exception occurred.
@@ -57,7 +57,7 @@ module Appsignal
57
57
  rescue => e
58
58
  result = "Something went wrong while trying to " \
59
59
  "authenticate with AppSignal: #{e}"
60
- [nil, result]
60
+ ["error", result]
61
61
  end
62
62
  end
63
63
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Appsignal
4
4
  module CheckIn
5
+ # @!visibility private
5
6
  class Cron
6
- # @api private
7
7
  attr_reader :identifier, :digest
8
8
 
9
9
  def initialize(identifier:)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Appsignal
4
4
  module CheckIn
5
- # @api private
5
+ # @!visibility private
6
6
  class Event
7
7
  class << self
8
8
  def new(check_in_type:, identifier:, digest: nil, kind: nil)
@@ -2,8 +2,11 @@
2
2
 
3
3
  module Appsignal
4
4
  module CheckIn
5
+ # @!visibility private
5
6
  class Scheduler
7
+ # @!visibility private
6
8
  INITIAL_DEBOUNCE_SECONDS = 0.1
9
+ # @!visibility private
7
10
  BETWEEN_TRANSMISSIONS_DEBOUNCE_SECONDS = 10
8
11
 
9
12
  def initialize
@@ -75,7 +78,6 @@ module Appsignal
75
78
  end
76
79
  end
77
80
 
78
- # @api private
79
81
  # For internal testing purposes.
80
82
  attr_reader :thread, :waker, :queue, :events, :transmitted
81
83
 
@@ -2,16 +2,18 @@
2
2
 
3
3
  module Appsignal
4
4
  module CheckIn
5
+ # @!visibility private
5
6
  HEARTBEAT_CONTINUOUS_INTERVAL_SECONDS = 30
7
+ # @!visibility private
6
8
  NEW_SCHEDULER_MUTEX = Mutex.new
7
9
 
8
10
  class << self
9
- # @api private
11
+ # @!visibility private
10
12
  def continuous_heartbeats
11
13
  @continuous_heartbeats ||= []
12
14
  end
13
15
 
14
- # @api private
16
+ # @!visibility private
15
17
  def kill_continuous_heartbeats
16
18
  continuous_heartbeats.each(&:kill)
17
19
  end
@@ -36,8 +38,9 @@ module Appsignal
36
38
  # end
37
39
  #
38
40
  # @param identifier [String] identifier of the cron check-in to report.
39
- # @yield the block to monitor.
40
- # @return [void]
41
+ # @yield [] the block to monitor.
42
+ # @yieldreturn [Object] The return value of the block
43
+ # @return [Object] returns the block value.
41
44
  # @since 3.13.0
42
45
  # @see https://docs.appsignal.com/check-ins/cron
43
46
  def cron(identifier)
@@ -84,7 +87,7 @@ module Appsignal
84
87
  scheduler.schedule(event)
85
88
  end
86
89
 
87
- # @api private
90
+ # @!visibility private
88
91
  def scheduler
89
92
  return @scheduler if @scheduler
90
93
 
@@ -95,7 +98,7 @@ module Appsignal
95
98
  @scheduler
96
99
  end
97
100
 
98
- # @api private
101
+ # @!visibility private
99
102
  def stop
100
103
  scheduler&.stop
101
104
  end
@@ -75,7 +75,7 @@ module Appsignal
75
75
  # @option options :environment [String] environment to load
76
76
  # configuration for.
77
77
  # @return [void]
78
- # @api private
78
+ # @!visibility private
79
79
  def run(options = {})
80
80
  # Do not start AppSignal on `Appsignal.start` and run the extension
81
81
  # and agent in diagnose mode.
data/lib/appsignal/cli.rb CHANGED
@@ -9,7 +9,7 @@ require "appsignal/cli/diagnose"
9
9
  require "appsignal/cli/install"
10
10
 
11
11
  module Appsignal
12
- # @api private
12
+ # @!visibility private
13
13
  class CLI
14
14
  AVAILABLE_COMMANDS = %w[demo diagnose install].freeze
15
15