Raven Ruby v5.2.0 Release Notes

  • ๐Ÿ”‹ Features

    • ๐Ÿ’Ž Log Redis command arguments when sending PII is enabled #1726
    • โž• Add request env to sampling context #1749

    Example

      Sentry.init do |config|
        config.traces_sampler = lambda do |sampling_context|
          env = sampling_context[:env]
    
          if env["REQUEST_METHOD"] == "GET"
            0.01
          else
            0.1
          end
        end
      end
    
    • ๐Ÿ’Ž Check envelope size before sending it #1747

    The SDK will now check if the envelope's event items are oversized before sending the envelope. It goes like this:

    1. If an event is oversized (200kb), the SDK will remove its breadcrumbs (which in our experience is the most common cause).
    2. If the event size now falls within the limit, it'll be sent.
    3. Otherwise, the event will be thrown away. The SDK will also log a debug message about the event's attributes size (in bytes) breakdown. For example,
      {event_id: 34, level: 7, timestamp: 22, environment: 13, server_name: 14, modules: 935, message: 5, user: 2, tags: 2, contexts: 820791, extra: 2, fingerprint: 2, platform: 6, sdk: 40, threads: 51690}
    

    This will help users report size-related issues in the future.

    • ๐Ÿ’Ž Automatic session tracking #1715

    Example:

    The SDK now supports automatic session tracking / release health by default in Rack based applications.
    Aggregate statistics on successful / errored requests are collected and sent to the server every minute.
    To use this feature, make sure the SDK can detect your app's release. Or you have set it with:

      Sentry.init do |config|
        config.release = 'release-foo-v1'
      end
    

    To disable this feature, set config.auto_session_tracking to false.

    ๐Ÿ› Bug Fixes