gems sentry-ruby 6.3.0

7 hours ago

Features

  • Implement new Sentry.metrics functionality (#2818)

    The SDK now supports Sentry's new Trace Connected Metrics product.

     Sentry.metrics.count("button.click", 1, attributes: { button_id: "submit" })
     Sentry.metrics.distribution("response.time", 120.5, unit: "millisecond")
     Sentry.metrics.gauge("cpu.usage", 75.2, unit: "percent")

    Metrics is enabled by default and only activates once you use the above APIs. To disable completely:

    Sentry.init do |config|
      # ...
      config.enable_metrics = false
    end
  • Support for tracing Sequel queries (#2814)

    require "sentry"
    require "sentry/sequel"
    
    Sentry.init do |config|
      config.enabled_patches << :sequel
    end
    
    DB = Sequel.sqlite
    DB.extension(:sentry)
  • Add support for OpenTelemetry messaging/queue system spans (#2685)

  • Add support for config.std_lib_logger_filter proc (#2829)

    Sentry.init do |config|
      config.std_lib_logger_filter = proc do |logger, message, severity|
        # Only send ERROR and above messages
        severity == :error || severity == :fatal
      end
    
      config.enabled_patches = [:std_lib_logger]
    end

Bug Fixes

  • Handle empty frames case gracefully with local vars (#2807)
  • Handle more extra attribute types when using extra attributes for structured logging (#2815)
    # This now works too and the nested hash is dumped to JSON string
    Sentry.logger.info("Hello World", extra: { today: Date.today, user_id: user.id })
  • Prevent SDK crash when SDK logging fails (#2817)

Internal

  • Unify Logs and Metrics implementations (#2826)
  • Unify LogEventBuffer and MetricEventBuffer logic (#2830)
  • Add maximum limits on LogEventBuffer (1k) and MetricEventBuffer (10k) for protection from memory blowup (#2831)
  • Lazily start LogEventBuffer and MetricEventBuffer threads (#2832)

Don't miss a new sentry-ruby release

NewReleases is sending notifications on new releases.