Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(transactions): option for not doing transactions sampling in post_process #81079

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

JoshFerge
Copy link
Member

in lockstep with #81077, stops doing work in post_process on transactions. part of #81065

@@ -2919,6 +2919,7 @@
"performance.event-tracker.sample-rate.transaction",
default=0.0,
)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@@ -611,7 +611,7 @@ def get_event_raise_exception() -> Event:
# Simplified post processing for transaction events.
# This should eventually be completely removed and transactions
# will not go through any post processing.
if is_transaction_event:
if is_transaction_event and not options.get("transactions.do_post_process_in_save"):
Copy link
Member

Choose a reason for hiding this comment

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

I believe there's a slight chance of a small window where the servers processing the two different stages of processing will not have synchronized options applied.

What would be the consequences of this code not applying at all for some transactions?
Or the consequences of calling twice?

I don't think it is important to handle it if it would not cause any major problems.

Copy link
Member Author

Choose a reason for hiding this comment

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

TLDR: it shouldn't matter very much, it's used for transaction clustering, some blips in processing shouldn't affect this very much. (and even if it did, it is not a super critical feature).

called out in the ticket here:

I assume that we're okay with a minute of data or so being lost from the transaction clusterer. by doing a simple switch-over, we can save some complexity. (i believe this is just used for accurate dynamic sampling calculations)

Lyn also asked about this. responded here:

#81077 (comment)

from reading about the transactions sampler, i believe it is a feature that helps with parameterizing high cardinality transaction names. i don't believe double sampling (wouldn't happen as i've implemented) or not having samples (would be the case for a few moments for this deploy) would have a large effect on the product.
https://develop.sentry.dev/api-server/application-domains/transaction-clustering/#accidental-erasure-of-non-identifiers

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Makes sense to me when paired with #81077

@JoshFerge JoshFerge merged commit dfcb3a5 into jferg/tx-post-process-1 Nov 21, 2024
44 checks passed
@JoshFerge JoshFerge deleted the jferg/tx-post-process-2 branch November 21, 2024 15:53
@JoshFerge
Copy link
Member Author

@markstory i've gone ahead and merged this into #81077

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.

4 participants