Skip to content

draft: Add metadata around transaction name changes #5709

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

Closed
wants to merge 8 commits into from

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Sep 8, 2022

This is a draft PR that adds metadata around transaction name changes for #5679. It's mainly being used to get feedback around the data being sent, and the general approach being used.

If folks are fine with this, I'll split this up into smaller PRs with test changes.

The schema looks like this:

/**
 * Object representing metadata about when a transaction name was changed.
 */
export interface TransactionNameChange {
  // new name
  name: string;
  // unix timestamp when the name was changed
  timestamp: number;
  // new source
  source: TransactionSource;
  // number of propagations since start of transaction.
  propagations: number;
}

In addition to an array of these transaction name changes, we also store the total amount of propagations, which should help understand the relative nature of the propagations.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.53 KB (+0.36% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.3 KB (+0.33% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.11 KB (+0.39% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 53.22 KB (+0.36% 🔺)
@sentry/browser - Webpack (gzipped + minified) 19.91 KB (+0.39% 🔺)
@sentry/browser - Webpack (minified) 64.66 KB (+0.38% 🔺)
@sentry/react - Webpack (gzipped + minified) 19.93 KB (+0.39% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.02 KB (+0.33% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.12 KB (+0.6% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.5 KB (+0.64% 🔺)

@AbhiPrasad AbhiPrasad mentioned this pull request Sep 8, 2022
10 tasks
@AbhiPrasad AbhiPrasad force-pushed the abhi-transaction-name-change branch from 5c28e06 to 8c00b71 Compare September 8, 2022 11:03
nameChanges: TransactionNameChange[];

/** The total number of propagations that happened */
numPropagations: number;
Copy link
Member

Choose a reason for hiding this comment

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

This is called propagations on TransactionNameChange, would opt for using the same shorter name here:

Suggested change
numPropagations: number;
propagations: number;

Copy link
Member Author

Choose a reason for hiding this comment

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

done - e9ccebd

*/
export interface TransactionNameChange {
// new name
name: string;
Copy link
Member

Choose a reason for hiding this comment

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

As discussed offline, we don't require the name for analysis right now. If we drop it, we further prevent the possibility of capturing unintended.

Copy link
Member Author

Choose a reason for hiding this comment

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

done - 3ef0b80

// new name
name: string;
// unix timestamp when the name was changed
timestamp: number;
Copy link
Member

Choose a reason for hiding this comment

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

FTR: The develop spec and Relay protocol definition should use the same type as other timestamps in the protocol, allowing for ISO strings in addition to numbers.

@AbhiPrasad
Copy link
Member Author

Alright - I'm going to split this PR up so we can start reviewing/testing/and merging in components we can ship

@AbhiPrasad AbhiPrasad closed this Sep 8, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-transaction-name-change branch September 8, 2022 14:12
Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

This looks good!

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