Skip to content

Commit

Permalink
fix(spans): Correct outcome reason for invalid standalone spans
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Sep 20, 2024
1 parent c6e3021 commit 479bac6
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
@@ -1,5 +1,9 @@
# Changelog

**Bug Fixes**:

- Report invalid spans with appropriate outcome reason.

## Unreleased

**Features:**
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 479bac6

Please sign in to comment.