5.2.0
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:
- If an event is oversized (200kb), the SDK will remove its breadcrumbs (which in our experience is the most common cause).
- If the event size now falls within the limit, it'll be sent.
- 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
tofalse
.