Skip to content

ref(processing): Use new transactions processor#5379

Merged
jjbayer merged 106 commits intomasterfrom
ref/use-new-processor
Jan 19, 2026
Merged

ref(processing): Use new transactions processor#5379
jjbayer merged 106 commits intomasterfrom
ref/use-new-processor

Conversation

@jjbayer
Copy link
Copy Markdown
Member

@jjbayer jjbayer commented Nov 14, 2025

Closes INGEST-610.

@linear
Copy link
Copy Markdown

linear Bot commented Nov 14, 2025

@jjbayer jjbayer changed the base branch from master to ref/assert_split_once January 18, 2026 15:35
Base automatically changed from ref/assert_split_once to master January 18, 2026 19:15
Comment on lines -893 to -900
# Ignore span metrics, they may be emitted because rate limits from transactions are not
# currently enforced for spans, which they should be. See: https://github.com/getsentry/relay/issues/4961.
metrics = {metric["name"] for (metric, _) in metrics_consumer.get_metrics()}
assert metrics == {
"c:spans/count_per_root_project@none",
"c:spans/usage@none",
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yay!

Comment on lines +796 to +798
config["transactionMetrics"] = {
"version": TRANSACTION_EXTRACT_MIN_SUPPORTED_VERSION - 1,
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is necessary because I added a valid version to the default project config.

Comment on lines +194 to +195
if event_id:
envelope.headers["event_id"] = event_id
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This test previously only passed because the metrics extraction version was too low. I.e. it used the wrong event ID for dynamic sampling (the auto-generated one from the envelope header), but the test does not check why so it passed anyway.

@jjbayer jjbayer marked this pull request as ready for review January 19, 2026 07:26
Copy link
Copy Markdown

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread relay-server/src/processing/transactions/mod.rs
Comment thread relay-server/src/processing/transactions/mod.rs Outdated
process::run_dynamic_sampling(&work, ctx, filters_status, quotas_client).await;

relay_log::trace!("Sample transaction");
let headers = work.headers.clone();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you could also return the headers from SamplingOutput::Drop?

Comment thread relay-server/src/processing/transactions/mod.rs Outdated
Comment thread relay-server/src/processing/transactions/mod.rs Outdated
Copy link
Copy Markdown

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


if work.flags.spans_killswitched {
r.lenient(DataCategory::Span);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing SpanIndexed lenient marking when spans killswitched

Medium Severity

When spans_killswitched is true, split_indexed_and_total only marks DataCategory::Span as lenient, but not DataCategory::SpanIndexed. This is inconsistent with extract_spans which marks both categories as lenient. Since split_indexed_and_total can be called via the dynamic sampling "drop" path in non-processing relays (where extract_spans doesn't run), the ExpandedTransaction<Indexed> will still count embedded spans as SpanIndexed without the category being marked lenient, causing incorrect accounting.

Additional Locations (1)

Fix in Cursor Fix in Web

@jjbayer jjbayer force-pushed the ref/use-new-processor branch from 84782e4 to 34eec75 Compare January 19, 2026 11:23
Copy link
Copy Markdown

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread relay-server/src/processing/transactions/process.rs
@jjbayer jjbayer added this pull request to the merge queue Jan 19, 2026
Merged via the queue into master with commit df2cf2e Jan 19, 2026
29 checks passed
@jjbayer jjbayer deleted the ref/use-new-processor branch January 19, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants