Skip to content

Commit

Permalink
Undo transaction_count changes
Browse files Browse the repository at this point in the history
  • Loading branch information
viglia committed Aug 4, 2023
1 parent 8642f7e commit 9375cba
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions relay-server/src/actors/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,18 +1066,8 @@ impl EnvelopeProcessorService {
.count();
let mut found_profile = false;
state.managed_envelope.retain_items(|item| match item.ty() {
// Drop profile without a transaction in the same envelope if sampled==true.
// If sampled != true, then the transaction was removed due to DS (unsampled),
// but we still want to keep the profile for aggregations (slowest functions, etc.)
ItemType::Profile
if (transaction_count == 0)
&& item
.get_header("sampled")
.and_then(Value::as_bool)
.unwrap_or(true) =>
{
ItemAction::DropSilently
}
// Drop profile without a transaction in the same envelope.
ItemType::Profile if transaction_count == 0 => ItemAction::DropSilently,
ItemType::Profile => {
if !found_profile {
match relay_profiling::parse_metadata(&item.payload()) {
Expand Down

0 comments on commit 9375cba

Please sign in to comment.