Skip to content

fix(data-forwarding): Guard against None exception values in forwarders - #129425

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/data-forwarding-none-exception-values
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/data-forwarding-none-exception-values

Conversation

@sentry

@sentry sentry Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Problem

In SegmentForwarder.get_event_payload (and similarly in SplunkForwarder.get_event_payload_properties), exception information was extracted unconditionally using event.interfaces["exception"].values[0].type.

The Exception interface intentionally preserves None entries in values to keep exception offsets stable (e.g. after invalid entries are scrubbed during normalization). When values[0] is None, this caused an unhandled AttributeError: 'NoneType' object has no attribute 'type' during post_process_group's process_data_forwarding step, preventing events from being forwarded to Segment.

Fix

  • In SegmentForwarder and SplunkForwarder, pick the first non-None entry from values.
  • Only populate exception fields (exceptionType, exception_type, exception_value) if a concrete exception value was found.
  • Add regression tests covering events with leading None exception values as well as all-None values.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes SENTRY-5ZEV

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested a review from a team as a code owner October 31, 2026 10:48
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 31, 2026

This branch has not been deployed

No deployments
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.

0 participants