Skip to content

Commit

Permalink
fix(spans): Correct outcome reason for invalid standalone spans (#4051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer authored Sep 20, 2024
1 parent c6e3021 commit d8e6bbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

**Bug Fixes**:

- Report invalid spans with appropriate outcome reason. ([#4051](https://github.com/getsentry/relay/pull/4051))

**Features:**

- Add a config option to add default tags to all Relay Sentry events. ([#3944](https://github.com/getsentry/relay/pull/3944))
Expand Down
7 changes: 6 additions & 1 deletion relay-server/src/services/processor/span/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ pub fn process(

if let Err(e) = normalize(&mut annotated_span, normalize_span_config.clone()) {
relay_log::debug!("failed to normalize span: {}", e);
return ItemAction::Drop(Outcome::Invalid(DiscardReason::Internal));
return ItemAction::Drop(Outcome::Invalid(match e {
ProcessingError::InvalidTransaction | ProcessingError::InvalidTimestamp => {
DiscardReason::InvalidSpan
}
_ => DiscardReason::Internal,
}));
};

if let Some(span) = annotated_span.value() {
Expand Down

0 comments on commit d8e6bbc

Please sign in to comment.