Skip to content

Apply Limits to ReactiveCaching for Error Tracking

Peter Leitzen requested to merge pl-error-tracking-limit2 into master

What does this MR do and why?

This MR adds a feature flag error_tracking_sentry_limit (rollout issue) to limit all Sentry responses (1 megabyte) and the same limit for ReactiveCaching functionlity of model ErrorTracking::ProjectErrorTrackingSetting.

Prior this commit only single Sentry response was checked (list_issues) now we are checking them all.

In a rare (rather by an attacker) case where the limit is exceeded we show the error message:

Failed to load errors from Sentry.

Contributes to #356448 (closed)

Screenshots or screen recordings

Within Limit Limit exceeded Limit exceeded during setup
Screenshot_from_2022-09-02_11-21-37 Screenshot_from_2022-09-02_11-23-55 image

How to set up and validate locally

  1. Setup Sentry Integration with https://sentry.gitlab.net
  2. Enable feature flag via Feature.enable(:error_tracking_sentry_limit)
  3. List errors and view details
  4. Tweak RESPONSE_SIZE_LIMIT to 1.kilobyte
  5. List errors and see the error message showing up

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports