Skip to content

feat(processing_errors): Add native/proguard configuration issue detection#111382

Open
wedamija wants to merge 3 commits intomasterfrom
danf/native-config-issue-detection
Open

feat(processing_errors): Add native/proguard configuration issue detection#111382
wedamija wants to merge 3 commits intomasterfrom
danf/native-config-issue-detection

Conversation

@wedamija
Copy link
Copy Markdown
Member

Add a new detector for native debug symbol and Proguard mapping configuration issues, using the generalized framework from the previous commit.

Includes:

  • NativeDetectorHandler and NativeConfigurationType (type_id=13002)
  • NATIVE_ERROR_TYPES covering native_missing_dsym, native_bad_dsym, native_unsupported_dsym, native_optionally_bundled_dsym, proguard_missing_mapping, proguard_missing_lineno
  • Feature flag: organizations:native-issue-detection
  • Tests for handler, detection, and provisioning

@wedamija wedamija requested a review from a team March 24, 2026 00:12
@wedamija wedamija requested a review from a team as a code owner March 24, 2026 00:12
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 24, 2026
@wedamija wedamija force-pushed the danf/generalize-processing-error-detection branch from c1e9426 to f62ea5d Compare March 24, 2026 23:01
@wedamija wedamija force-pushed the danf/native-config-issue-detection branch from 2acfa08 to 0bbb6b2 Compare March 24, 2026 23:01
from sentry.issues.status_change_message import StatusChangeMessage
from sentry.models.group import GroupStatus
from sentry.processing_errors.detection import _redis_key_triggered
from sentry.processing_errors.detection import _cache_key_triggered
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The periodic task resolve_stale_sourcemap_detectors is hardcoded for sourcemaps and was not updated to handle new native detectors, preventing them from ever being resolved.
Severity: HIGH

Suggested Fix

Generalize the resolve_stale_sourcemap_detectors task to handle all detector types. This can be done by making it loop through DETECTOR_CONFIGS or by creating a new generic task like resolve_stale_processing_error_detectors that handles all types.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/sentry/processing_errors/tasks.py#L12

Potential issue: The periodic task `resolve_stale_sourcemap_detectors` is hardcoded to
only handle `sourcemap_configuration` detectors. While the detection logic was
generalized to support new `NativeConfigurationType` detectors, the resolution task was
not. As a result, once a native detector is triggered, its `is_triggered` state will
never be reset to `false` automatically. This will prevent any new native processing
errors from being reported for that project because the detection logic returns early if
a detector is already triggered.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/sentry/processing_errors/tasks.py Outdated
from sentry.workflow_engine.handlers.detector.stateful import (
StatefulDetectorHandler,
get_redis_client,
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolution task never resolves native detectors

High Severity

The resolve_stale_sourcemap_detectors task only queries for detector__type=SourcemapConfigurationType.slug, so triggered NativeConfigurationType detectors will never be auto-resolved. The detection path was generalized to trigger both sourcemap and native detectors, and _resolve_detector was updated to work generically (using state.detector.type dynamically for cache keys and metrics), but the periodic task's query filter was not updated to also include NativeConfigurationType.slug. Once a native detector is triggered, it stays triggered permanently and can never re-trigger if the problem recurs.

Fix in Cursor Fix in Web

Base automatically changed from danf/generalize-processing-error-detection to master March 25, 2026 18:33
…ction

Add a new detector for native debug symbol and Proguard mapping
configuration issues, using the generalized framework from the
previous commit.

Includes:
- NativeDetectorHandler and NativeConfigurationType (type_id=13002)
- NATIVE_ERROR_TYPES covering native_missing_dsym, native_bad_dsym,
  native_unsupported_dsym, native_optionally_bundled_dsym,
  proguard_missing_mapping, proguard_missing_lineno
- Feature flag: organizations:native-issue-detection
- Tests for handler, detection, and provisioning
@wedamija wedamija force-pushed the danf/native-config-issue-detection branch from 0bbb6b2 to 20b82d9 Compare March 25, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants