Skip to content

Update dependency sentry-ruby to '~> 5.17.3'

This MR contains the following updates:

Package Update Change
sentry-ruby (changelog) minor '~> 5.10.0' -> '~> 5.17.3'

MR created with the help of gitlab-org/frontend/renovate-gitlab-bot


Release Notes

getsentry/sentry-ruby (sentry-ruby)

v5.17.3

Compare Source

Features
  • Update key, unit and tags sanitization logic for metrics #​2292
  • Consolidate client report and rate limit handling with data categories #​2294
  • Record :network_error client reports for send_envelope #​2295
Bug Fixes
  • Make sure isolated envelopes respect config.enabled_environments #​2291

v5.17.2

Compare Source

Features
  • Add Mechanism interface and default to unhandled for integration exceptions #​2280
Bug Fixes
  • Don't instantiate connection in ActiveRecordSubscriber (#​2278)

v5.17.1

Compare Source

Bug Fixes
  • Fix NoMethodError / Make session_tracking check consistent (#​2269)

v5.17.0

Compare Source

Features
  • Add support for distributed tracing in sentry-delayed_job #​2233
  • Fix warning about default gems on Ruby 3.3.0 (#​2225)
  • Add hint: support to Sentry::Rails::ErrorSubscriber #​2235
  • Add Metrics support
    • Add main APIs and Aggregator thread #​2247

    • Add Sentry::Metrics.timing API for measuring block duration #​2254

    • Add metric summaries on spans #​2255

    • Add config.metrics.before_emit callback #​2258

    • Add code locations for metrics #​2263

      The SDK now supports recording and aggregating metrics. A new thread will be started for aggregation and will flush the pending data to Sentry every 5 seconds.

      To enable this behavior, use:

      Sentry.init do |config|

...

  config.metrics.enabled = true
end
```

And then in your application code, collect metrics as follows:

```ruby

increment a simple counter

Sentry::Metrics.increment('button_click')

set a value, unit and tags

Sentry::Metrics.increment('time', 5, unit: 'second', tags: { browser:' firefox' })

distribution - get statistical aggregates from an array of observations

Sentry::Metrics.distribution('page_load', 15.0, unit: 'millisecond')

gauge - record statistical aggregates directly on the SDK, more space efficient

Sentry::Metrics.gauge('page_load', 15.0, unit: 'millisecond')

set - get unique counts of elements

Sentry::Metrics.set('user_view', 'jane')

timing - measure duration of code block, defaults to seconds

will also automatically create a metric.timing span

Sentry::Metrics.timing('how_long') { sleep(1) }

timing - measure duration of code block in other duraton units

Sentry::Metrics.timing('how_long_ms', unit: 'millisecond') { sleep(0.5) }
```

You can filter some keys or update tags on the fly with the `before_emit` callback, which will be triggered before a metric is aggregated.

```ruby
Sentry.init do |config|

...

the 'foo' metric will be filtered and the tags will be updated to add :bar and remove :baz

  config.metrics.before_emit = lambda do |key, tags|
    return nil if key == 'foo'
    tags[:bar] = 42
    tags.delete(:baz)
    true
  end
end
```

By default, the SDK will send code locations for unique metrics (defined by type, key and unit) once a day and with every startup/shutdown of your application.
You can turn this off with the following:

```ruby
Sentry.init do |config|

...

  config.metrics.enable_code_locations = false
end
```
Bug Fixes
  • Fix undefined method 'constantize' issue in sentry-resque (#​2248)
  • Only instantiate SessionFlusher when the SDK is enabled under the current env #​2245
  • Update backtrace parsing regexp to support Ruby 3.4 (#​2252)
  • Make sure sending_allowed? is respected irrespective of spotlight configuration (#​2231)

v5.16.1

Compare Source

Bug Fixes
  • Pin sqlite3 gem for building because of failed release #​2222

v5.16.0

Compare Source

Features
  • Add backpressure handling for transactions #​2185

    The SDK can now dynamically downsample transactions to reduce backpressure in high throughput systems. It starts a new BackpressureMonitor thread to perform some health checks which decide to downsample (halved each time) in 10 second intervals till the system is healthy again.

    To enable this behavior, use:

    Sentry.init do |config|

...

  config.traces_sample_rate = 1.0
  config.enable_backpressure_handling = true
end
```

If your system serves heavy load, please let us know how this feature works for you!
  • Implement proper flushing logic on close for Client Reports and Sessions #​2206

  • Support cron with timezone for sidekiq-scheduler patch #​2209

  • Add Cron::Configuration object that holds defaults for all MonitorConfig objects #​2211

    Sentry.init do |config|

...

  config.cron.default_checkin_margin = 1
  config.cron.default_max_runtime = 30
  config.cron.default_timezone = 'America/New_York'
end
```
  • Clean up logging #​2216
  • Pick up config.cron.default_timezone from Rails config #​2213
  • Don't add most scope data (tags/extra/breadcrumbs) to CheckInEvent #​2217

v5.15.2

Compare Source

Bug Fixes

v5.15.1

Compare Source

Features
  • Expose configuration.background_worker_max_queue to control thread pool queue size #​2195
Bug Fixes
  • Fix Sentry::Cron::MonitorCheckIns monkeypatch keyword arguments #​2199

v5.15.0

Compare Source

Features
  • You can now use Spotlight with your apps that use sentry-ruby! #​2175
  • Improve default slug generation for sidekiq-scheduler #​2184
Bug Fixes
  • Network errors raised in Sentry::HTTPTransport will no longer be reported to Sentry #​2178

v5.14.0

Compare Source

Features
  • Improve default slug generation for Crons #​2168
  • Change release name generator to use full SHA commit hash and align with sentry-cli and other Sentry SDKs #​2174
  • Automatic Crons support for scheduling gems
    • Add support for sidekiq-cron #​2170

      You can opt in to the sidekiq-cron patch and we will automatically monitor check-ins for all jobs listed in your config/schedule.yml file.

      config.enabled_patches += [:sidekiq_cron]
    • Add support for sidekiq-scheduler #​2172

      You can opt in to the sidekiq-scheduler patch and we will automatically monitor check-ins for all repeating jobs (i.e. cron, every, and interval) specified in the config.

      config.enabled_patches += [:sidekiq_scheduler]
Bug Fixes
  • Fixed a deprecation in sidekiq-ruby error handler #​2160
  • Avoid invoking ActiveSupport::BroadcastLogger if not defined #​2169
  • Respect custom Delayed::Job.max_attempts if it's defined #​2176
  • Fixed a bug where Net::HTTP instrumentation won't work for some IPv6 addresses #​2180
  • Allow non-string error message to be reported to sentry (#​2137)

v5.13.0

Compare Source

Features
  • Make additional job context available to traces_sampler for determining sample rate (sentry-delayed_job) #​2148

  • Add new config.rails.active_support_logger_subscription_items to allow customization breadcrumb data of active support logger #​2139

      config.rails.active_support_logger_subscription_items["sql.active_record"] << :type_casted_binds
      config.rails.active_support_logger_subscription_items.delete("sql.active_record")
      config.rails.active_support_logger_subscription_items["foo"] = :bar
  • Enable opting out of patches #​2151

Bug Fixes
  • Fix puma integration for versions before v5 #​2141
  • Fix breadcrumbs with warn level not being ingested #​2150
  • Don't send negative line numbers in profiles #​2158
  • Allow transport proxy configuration to be set with HTTP_PROXY environment variable #​2161

v5.12.0

Compare Source

Features
  • Record client reports for profiles #​2107
  • Adopt Rails 7.1's new BroadcastLogger #​2120
  • Support sending events after all retries were performed (sentry-resque) #​2087
  • Add Cron Monitoring support
    • Add Sentry.capture_check_in API for Cron Monitoring #​2117

      You can now track progress of long running scheduled jobs.

      check_in_id = Sentry.capture_check_in('job_name', :in_progress)

do job stuff

Sentry.capture_check_in('job_name', :ok, check_in_id: check_in_id)
```
  • Add Sentry::Cron::MonitorCheckIns module for automatic monitoring of jobs #​2130

    Standard job frameworks such as ActiveJob and Sidekiq can now use this module to automatically capture check ins.

    class ExampleJob < ApplicationJob
      include Sentry::Cron::MonitorCheckIns
    
      sentry_monitor_check_ins
    
      def perform(*args)

do stuff

  end
end
```

```rb
class SidekiqJob
  include Sidekiq::Job
  include Sentry::Cron::MonitorCheckIns

  sentry_monitor_check_ins

  def perform(*args)

do stuff

  end
end
```

You can pass in optional attributes to `sentry_monitor_check_ins` as follows.
```rb

slug defaults to the job class name

sentry_monitor_check_ins slug: 'custom_slug'

define the monitor config with an interval

sentry_monitor_check_ins monitor_config: Sentry::Cron::MonitorConfig.from_interval(1, :minute)

define the monitor config with a crontab

sentry_monitor_check_ins monitor_config: Sentry::Cron::MonitorConfig.from_crontab('5 * * * *')
```
Bug Fixes
  • Rename http.method to http.request.method in Span::DataConventions #​2106
  • Increase Envelope::Item::MAX_SERIALIZED_PAYLOAD_SIZE to 1MB #​2108
  • Fix db_config begin nil in ActiveRecordSubscriber #​2111
  • Always send envelope trace header from dynamic sampling context #​2113
  • Improve TestHelper's setup/teardown helpers (#​2116)
  • Fix Sidekiq tracing headers not being overwritten in case of schedules and retries #​2118
  • Fix exception event sending failed due to source sequence is illegal/malformed utf-8 #​2083

v5.11.0

Compare Source

Features
  • Make :value in SingleExceptionInterface writable, so that it can be modified in before_send under event.exception.values[n].value #​2072

  • Add sampled field to dynamic_sampling_context #​2092

  • Consolidate HTTP span data conventions with OpenTelemetry with Sentry::Span::DataConventions #​2093

  • Consolidate database span data conventions with OpenTelemetry for ActiveRecord and Redis #​2100

  • Add new config.trace_propagation_targets option to set targets for which headers are propagated in outgoing HTTP requests #​2079


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by Lukas 'ai-pi' Eipert

Merge request reports