-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(types): Add TransactionNameChange
interface
#5714
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
Conversation
3bedc17
to
fa90b33
Compare
size-limit report 📦
|
/** Metadata representing information about transaction name changes */ | ||
changes: TransactionNameChange[]; | ||
|
||
/** The total number of propagations that happened */ | ||
propagations: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a train of thought: We could explore having two type definitions for all top level options. One that is user-facing, and one that is internal to us. That way we don't create technical breaking changes when we remove values like these again after testing.
Doesn't need action on your part. Just wanted to write that down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great point - but it introduces some complexity where we'll need to cast appropriately when working between user-defined and internally defined types, which could cause a lot of trouble (esp in places like tests, or across package boundaries).
Part of #5679
This PR adds types for the
TransactionNameChange
interface:TransactionNameChange
is an object that describes a point in time when a transaction name was changed. It contains a Unix timestamp (matching with span/transaction start/end timestamps), the transaction source for the changed name, and the number of propagations (when dynamic sampling context was sent to another SDK - through meta tag/http header) that happened since that transaction name change.Next steps are described in #5679.