Skip to content

Releases: getsentry/sentry-ruby

5.24.0

15 May 10:32
Compare
Choose a tag to compare

Features

  • Add new sidekiq config report_only_dead_jobs (#2581)

  • Add max_nesting of 10 to breadcrumbs data serialization (#2583)

  • Add sidekiq config propagate_traces to control trace header injection (#2588)

    If you use schedulers you can get one large trace with all your jobs which is undesirable.
    We recommend using the following to propagate traces only from the Rails server and not elsewhere.

    config.sidekiq.propagate_traces = false unless Rails.const_defined?('Server')
  • Only expose active_storage keys on span data if send_default_pii is on (#2589)

  • Add new Sentry.logger for Structured Logging feature (#2620).

    To enable structured logging you need to turn on the enable_logs configuration option:

    Sentry.init do |config|
      # ... your setup ...
      config.enable_logs = true
    end

    Once you configured structured logging, you get access to a new Sentry.logger object that can be
    used as a regular logger with additional structured data support:

    Sentry.logger.info("User logged in", user_id: 123)
    
    Sentry.logger.error("Failed to process payment",
      transaction_id: "tx_123",
      error_code: "PAYMENT_FAILED"
    )

    You can also use message templates with positional or hash parameters:

    Sentry.logger.info("User %{name} logged in", name: "Jane Doe")
    
    Sentry.logger.info("User %s logged in", ["Jane Doe"])

    Any other arbitrary attributes will be sent as part of the log event payload:

    # Here `user_id` and `action` will be sent as extra attributes that Sentry Logs UI displays
    Sentry.logger.info("User %{user} logged in", user: "Jane", user_id: 123, action: "create")

    ⚠️ When enable_logs is true, previous Sentry.logger should no longer be used for internal SDK
    logging - it was replaced by Sentry.configuration.sdk_logger and should be used only by the SDK
    itself and its extensions.

  • New configuration option called active_job_report_on_retry_error which enables reporting errors on each retry error (#2617)

Bug Fixes

  • Gracefully fail on malformed utf-8 breadcrumb message (#2582)
  • Fix breadcrumb serialization error message to be an object (#2584)
  • Fix compatibility issues with sidekiq-cron 2.2.0 (#2591)
  • Update sentry-sidekiq to work correctly with Sidekiq 8.0 and its new timestamp format (#2570)
  • Ensure we capture exceptions after each job retry (#2597)

Internal

  • Remove user_segment from DSC (#2586)
  • Replace logger with sdk_logger (#2621)
  • Sentry.logger is now deprecated when enable_logs is turned off. It's original behavior was ported to Sentry.configuration.sdk_logger. Please notice that this logger is internal and should only be used for SDK-specific logging needs. (#2621)

5.23.0

11 Mar 13:01
Compare
Choose a tag to compare

Features

  • Add correct breadcrumb levels for 4xx/5xx response codes (#2549)

Bug Fixes

  • Fix argument serialization for ranges that consist of ActiveSupport::TimeWithZone (#2548)
  • Prevent starting Vernier in nested transactions (#2528)
  • Fix TypeError when Resque.inline == true (#2564)

Internal

  • Use File.open in LineCache (#2566)
  • Update java backtrace regexp (#2567)
  • Stop byteslicing empty strings in breadcrumbs (#2574)

Miscellaneous

  • Deprecate enable_tracing in favor of traces_sample_rate = 1.0 #2535

5.22.4

06 Feb 12:06
Compare
Choose a tag to compare

Bug Fixes

  • Fix handling of cron with tz in Cron::Job (#2530)
  • Revert "[rails] support string errors in error reporter (#2464)" (#2533)
  • Removed unnecessary warning about missing stackprof when Vernier is configured as the profiler (#2537)
  • Fix regression with CheckInEvent in before_send (#2541)

Internal

  • Introduced Configuration#validate to validate configuration in Sentry.init block (#2538)
  • Introduced Sentry.dependency_installed? to check if a 3rd party dependency is available ie Sentry.dependency_installed?(:Vernier) (#2542)

5.22.3

29 Jan 11:33
Compare
Choose a tag to compare

Bug Fixes

  • Accept Hash in before_send* callbacks again (#2529)

5.22.2

24 Jan 10:38
Compare
Choose a tag to compare

Features

  • Improve the accuracy of duration calculations in cron jobs monitoring (#2471)
  • Use attempt_threshold to skip reporting on first N attempts (#2503)
  • Support code.namespace for Ruby 3.4+ stacktraces (#2506)

Bug fixes

  • Default to internal_error error type for OpenTelemetry spans #2473
  • Improve before_send and before_send_transaction's return value handling (#2504)
  • Fix a crash when calling Sentry.get_main_hub in a trap context (#2510)
  • Use URI::RFC2396_PARSER.escape explicitly to remove warning logs to stderr (#2509)

Internal

  • Test Ruby 3.4 in CI (#2506)
  • Upgrade actions workflows versions (#2506)
  • Stop relying on fugit (#2519)

5.22.1

16 Dec 10:53
Compare
Choose a tag to compare

Bug Fixes

  • Safe-navigate to session flusher #2396
  • Fix latency related nil error for Sidekiq Queues Module span data #2486

5.22.0

04 Dec 14:45
Compare
Choose a tag to compare

⚠️ Support for Queues tracking for ActiveJob required changing op in transaction context from "queue.sidekiq" to "queue.process". If you rely on this value (e.g. for sampling as described here), then you need to update your configuration accordingly.

Features

  • Add include_sentry_event matcher for RSpec #2424

  • Add support for Sentry Cache instrumentation, when using Rails.cache #2380

  • Add support for Queue Instrumentation for Sidekiq. #2403

  • Add support for string errors in error reporter (#2464)

  • Reset trace_id and add root transaction for sidekiq-cron #2446

  • Add support for Excon HTTP client instrumentation (#2383)

    Note: MemoryStore and FileStore require Rails 8.0+

Bug Fixes

  • Fix Vernier profiler not stopping when already stopped #2429
  • Fix send_default_pii handling in rails controller spans #2443
  • Fix RescuedExceptionInterceptor to handle an empty configuration #2428
  • Add mutex sync to SessionFlusher aggregates #2469
  • Fix sentry-rails' backtrace cleaner issues (#2475)

5.21.0

07 Oct 13:04
Compare
Choose a tag to compare

Features

  • Experimental support for multi-threaded profiling using Vernier (#2372)

    You can have much better profiles if you're using multi-threaded servers like Puma now by leveraging Vernier.
    To use it, first add vernier to your Gemfile and make sure it is loaded before sentry-ruby.

    # Gemfile
    
    gem 'vernier'
    gem 'sentry-ruby'

    Then, set a profiles_sample_rate and the new profiler_class configuration in your sentry initializer to use the new profiler.

    # config/initializers/sentry.rb
    
    Sentry.init do |config|
      # ...
      config.profiles_sample_rate = 1.0
      config.profiler_class = Sentry::Vernier::Profiler
    end

Internal

  • Profile items have bigger size limit now (#2421)
  • Consistent string freezing (#2422)

5.20.1

27 Sep 21:29
Compare
Choose a tag to compare

Bug Fixes

  • Skip rubocop.yml in spec.files (#2420)

5.20.0

27 Sep 20:02
Compare
Choose a tag to compare
  • Add support for $SENTRY_DEBUG and $SENTRY_SPOTLIGHT (#2374)
  • Support human readable intervals in sidekiq-cron (#2387)
  • Set default app dirs pattern (#2390)
  • Add new strip_backtrace_load_path boolean config (default true) to enable disabling load path stripping (#2409)

Bug Fixes

  • Fix error events missing a DSC when there's an active span (#2408)
  • Verifies presence of client before adding a breadcrumb (#2394)
  • Fix Net:HTTP integration for non-ASCII URI's (#2417)
  • Prevent Hub from having nil scope and client (#2402)