5.24.0
Features
-
Add new sidekiq config
report_only_dead_jobs(#2581) -
Add
max_nestingof 10 to breadcrumbs data serialization (#2583) -
Add sidekiq config
propagate_tracesto 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_storagekeys on span data ifsend_default_piiis on (#2589) -
Add new
Sentry.loggerfor Structured Logging feature (#2620).To enable structured logging you need to turn on the
enable_logsconfiguration option:Sentry.init do |config| # ... your setup ... config.enable_logs = true end
Once you configured structured logging, you get access to a new
Sentry.loggerobject 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")
⚠️ Whenenable_logsistrue, previousSentry.loggershould no longer be used for internal SDK
logging - it was replaced bySentry.configuration.sdk_loggerand should be used only by the SDK
itself and its extensions. -
New configuration option called
active_job_report_on_retry_errorwhich enables reporting errors on each retry error (#2617)
Bug Fixes
- Gracefully fail on malformed utf-8 breadcrumb message (#2582)
- Fixes #2376
- Fix breadcrumb serialization error message to be an object (#2584)
- Fixes #2478
- 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_segmentfrom DSC (#2586) - Replace
loggerwithsdk_logger(#2621) Sentry.loggeris now deprecated whenenable_logsis turned off. It's original behavior was ported toSentry.configuration.sdk_logger. Please notice that this logger is internal and should only be used for SDK-specific logging needs. (#2621)