-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DSC Mutability and Measurements #5679
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
Comments
Current state: https://develop.sentry.dev/sdk/event-payloads/transaction/#transaction-annotations I'm proposing we update the interface TransactionInfo {
source: TransactionSource;
// unix timestamp of first name change
first_name_change?: number;
// number of propogations that occured before initial name change
// only set if `first_name_change` is defined
num_initial_propogations?: number;
// number of times name was changed
// only set if `first_name_change` is defined
name_change_count?: number;
} |
Note: we'll be doing this only in JS for now, and will evaluate bringing this to other SDKs based on what the metrics we collect say. |
Two thoughts here:
|
Hmm I'm not sure about the proposed interface. To me it's a little "opinionated" in the sense, that we could collect more general data which could allow us to analyze the timing and stuff in Relay/wherever. What about something like this: interface TransactionInfo {
source: TransactionSource;
nameChanges?: TransactionNameChange[]
// only set if `nameChanges` is defined and not empty (we can also put this into TransactionNameChange)
num_initial_propagations?: number;
}
type TransactionNameChange = {
name: string, // new name
timestamp: number // unix timestamp when the name was changed (or just the delta to the tx start)
source: TransactionSource, // optionally, the new source
} I think this shouldn't be harder/more complex to implement than the other interface but provides us more data Anyway, feel free to go with whatever makes more sense. Just my 2 cents before I'm off for vacation 😎 |
I think let's settle on something like this, per @Lms24 great suggestion above. interface TransactionInfo {
source: TransactionSource;
name_changes?: TransactionNameChange[]
}
interface TransactionNameChange {
name: string; // new name
timestamp: number // unix timestamp when the name was changed (or just the delta to the tx start)
source?: TransactionSource; // new source
propagations: number; number of propagations since start of transaction.
} |
I'm good with the above change, but I also still think it's important to store the total number of propagations. As Jan said in the meeting, what we ultimately want is a percentage. |
Final spec: export interface TransactionInfo {
source: TransactionSource;
changes: TransactionNameChange[];
propagations: number;
};
/**
* Object representing metadata about when a transaction name was changed.
*/
export interface TransactionNameChange {
/**
* Unix timestamp when the name was changed. Same type as the start and
* end timestamps of a transaction and span.
*/
timestamp: number;
/** Previous source used before transaction name change */
source: TransactionSource;
/** Number of propagations since start of transaction */
propagations: number;
} Implementation in Relay: getsentry/relay#1466 |
Feature has been released with https://github.com/getsentry/sentry-javascript/releases/tag/7.13.0 |
Uh oh!
There was an error while loading. Please reload this page.
Problem statement:
Mis-match between transaction name set in DSC at beginning of trace and in transaction payloads later in trace. This is occurring at a high enough rate to indicate we cannot reliably sample based on trace.
Proposal:
Adjust the mutability of the DSC in an attempt to get a more accurate transaction name in the DSC of the overall trace, for sampling decisions to be more accurately reflect what users configure on product side.
To that end we would also like to gather metrics to further drive what types of changes, how often, and when they occur in the wild, so we can better determine when DSC should be "frozen"
Tasks:
Todo
In Progress
Done
TransactionNameChange
interface #5714TransactionNameChange
interface to track prev source as per Relay changes ref(tracing): Use previous source when logging name changes #5733Diagram for visual learners (courtesy of @jan-auer):
The text was updated successfully, but these errors were encountered: