Skip to content

sentry-ruby does not send profiling data because payload is oversized #2070

Closed

Description

Issue Description

I enabled profiling, but most of the time don't get any profiling information on interesting requests, because sentry-ruby throws away the Envelope with the message:

sentry: Envelope item [profile] is still oversized after size reduction: {event_id: 34, platform: 6, version: 3, profile: 261786, environment: 12, release: 4, timestamp: 27, device: 25, os: 72, runtime: 90, transaction: 153}

The serialize function tries to remove breadcrumbs and stacktrace to reduce the size below MAX_SERIALIZED_PAYLOAD_SIZE, but it seems to me, that MAX_SERIALIZED_PAYLOAD_SIZE (200kb) is too small for profiling data.

Reproduction Steps

Try to find profile data for requests with too much profile information. In my case I would need profiling in formation in Sentry for Proposal#index of the open source application https://github.com/decidim/decidim

Look in rails application logs for the message "Envelope item [profile] is still oversized after size reduction", probably it happens in a lot of rails applications.

Expected Behavior

I would expect sentry-rails to send profile information for all requests (according to config.profiles_sample_rate) to sentry, and to not throw away valid and important profiling information.

Actual Behavior

sentry-ruby throws away profiling information and I can't find any reason in Sentry why still no profiling data is arriving. I can only find information in the application logs, but also no error or warning.

Ruby Version

3.0.6

SDK Version

5.10.0

Integration and Its Version

Rails 6.1.7.4

Sentry Config

Sentry.init do |config|
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.traces_sample_rate = 1.0
config.profiles_sample_rate = 1.0
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

  • Status

    Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions