Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby gem 4.0 #667

Closed
82 tasks done
jeffkreeftmeijer opened this issue Nov 25, 2020 · 1 comment
Closed
82 tasks done

Ruby gem 4.0 #667

jeffkreeftmeijer opened this issue Nov 25, 2020 · 1 comment
Assignees

Comments

@jeffkreeftmeijer
Copy link
Member

jeffkreeftmeijer commented Nov 25, 2020

Plans for Ruby gem 4.0. This includes breaking changes, new features and removal of deprecations.

Changes

Features

Quality of life improvements

Integrations

  • Rails error reporter
  • Loader mechanism - Add loader mechanism #1192
    • 🚨 Breaking change
  • Rake: set default namespace to "rake"
    • 🚨 Breaking change

Always reporting data

  • Always register a at_exit callback to report the error with which the Ruby process crashed
  • Always register a at_exit callback to call Appsignal.stop
  • Add option to disable at_exit reporting: enable_at_exit_reporter: false
  • Always call Appsignal.stop on all rake tasks? Instrumented or not? Downside: slight delay in every rake execution when stopping. The stop call takes too long.

Instrumentation helpers

  • Remove the listen_for_error helper
    • 🚨 Breaking change
  • Deprecate the listen_for_error helper without replacement. Tell people to use rescue => error; Appsignal.report_error(error)
  • Appsignal.send_error copies current instrumented context like the Rails error handler. Blocked on the 'report multiple errors' item.
    • 🚨 Breaking change
    • Let's keep the behavior for send_error different. We should recommend people to use report_error for this behavior.
  • Have Appsignal.set_* helpers set the metadata on the transaction in the context of a report_error, set_error and send_error block.
    • Make global helpers work in error method callbacks #1216
    • That way we can document one way of setting this metadata on transactions, and not one way for the Appsignal module and another for the Transaction class.
    • Change the current transaction to the newly created one or use a different Thread variable to make sure it's never lost.
    • 🚨 Breaking change
  • Appsignal.monitor helper to replace monitor_transaction - Add monitor instrumentation helpers #1161

Maintenance

Documentation

Deprecated

Remove the following in the next major version:

  • Remove initial config from Config initializer?
  • Remove APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR output in diagnose, because the ENV var was removed.
  • Remove Transaction::FRONTEND constant
  • Go through all to do comments
  • Remove Transaction sample data 'metadata'
  • Remove Transaction.new's request and options arguments
  • Remove Transaction.create's request and options arguments
  • Remove Transaction#set_http_or_background_action
  • Remove Transaction#set_http_or_background_queue_start
  • Remove Transaction#params=
  • Remove Transaction::GenericRequest
  • Remove Appsignal.monitor_transaction and Appsignal.monitor_single_transaction
  • Remove appsignal.action and appsignal.route as action name values from the AbstractMiddleware, see Deprecate appsignal.route and appsignal.action request keys #1116
  • Remove Appsignal.start_logger - Deprecate Appsignal.start_logger #1119
  • Remove Appsignal.set_error tags and namespace arguments
  • Remove Appsignal.send_error tags and namespace arguments
  • Remove Appsignal::Rack::StreamingListener
  • Remove Appsignal::Rack::GenericInstrumentation, also remove the const_missing redirect
  • Remove Appsignal::Grape constants, also remove the const_missing redirect
  • Update config options behavior here:
    # If an error was detected during config file reading/parsing and the new
    # behavior is enabled to not start AppSignal on incomplete config, do not
    # start AppSignal.
    # TODO: Make default behavior in next major version. Remove
    # `inactive_on_config_file_error?` call.
  • Update config to stop on YAML file error:
    else
    "Skipping file config. In future versions AppSignal will not start " \
    "on a config file error. To opt-in to this new behavior set " \
    "'APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1' in your system " \
    "environment."
  • Remove debug option from Ruby and extension config
  • Remove transaction debug option from Ruby and extension config
  • Remove skip_session_data option from Ruby and extension config
  • Remove working_dir_path option from Ruby and extension config
  • working_dir_path deprecation:
    if config.include?(:working_dir_path)
    deprecation_message \
    "'working_dir_path' is deprecated, please use " \
    "'working_directory_path' instead and specify the " \
    "full path to the working directory",
    logger
    • Remove this code
  • Remove minutely probe constant redirect.
  • Remove Sidekiq plugin const_missing here
  • Remove Appsignal::Probes.probes.register
  • Remove Appsignal::Helpers::Metrics::set_host_gauge and Appsignal::Helpers::Metrics::set_process_gauge
    • Related issue: https://github.com/appsignal/appsignal-agent/issues/425
    • Remove all set_host_* metric helpers here:
      def set_host_gauge(_key, _value)
      Appsignal::Utils::StdoutAndLoggerMessage.warning \
      "The `set_host_gauge` method has been deprecated. " \
      "Calling this method has no effect. " \
      "Please remove method call in the following file to remove " \
      "this message.\n#{caller.first}"
      end
      def set_process_gauge(_key, _value)
      Appsignal::Utils::StdoutAndLoggerMessage.warning \
      "The `set_process_gauge` method has been deprecated. " \
      "Calling this method has no effect. " \
      "Please remove method call in the following file to remove " \
      "this message.\n#{caller.first}"
      end
tombruijn added a commit that referenced this issue Jan 11, 2024
I want to remove these functions from the Rust extension, but if the
Ruby gem still calls them, that would cause a new error on the next
extension update.

These functions already did nothing anymore in the Rust extension,
so not calling the extension functions loses no functionality. I did not
remove the Ruby methods, because people may still call them and we
should only remove methods in major releases.

Move the deprecation warnings to the Ruby gem and remove calls to the
extension functions.

- Part of appsignal/appsignal-agent#425
- Deprecations logged in
  #667
@tombruijn tombruijn changed the title Deprecations for 4.0 Changes and deprecatons to be removed for 4.0 Jul 3, 2024
@tombruijn tombruijn changed the title Changes and deprecatons to be removed for 4.0 Changes and deprecations to be removed for 4.0 Jul 3, 2024
@tombruijn tombruijn mentioned this issue Jul 3, 2024
5 tasks
@tombruijn tombruijn changed the title Changes and deprecations to be removed for 4.0 Ruby gem 4.0 Jul 8, 2024
@tombruijn tombruijn self-assigned this Jul 9, 2024
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
tombruijn added a commit that referenced this issue Jul 23, 2024
Go through all the deprecated things listed in #667 and mentioned in the
source code itself.

Clean up before the next major version.
@tombruijn
Copy link
Member

Ruby gem 4 has been released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants