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

fix(tracing): add new transaction source #6068

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/tracing/src/transaction.ts
Expand Up @@ -44,7 +44,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
this._name = transactionContext.name || '';

this.metadata = {
source: 'custom',
source: 'initialize',
...transactionContext.metadata,
spanMetadata: {},
changes: [],
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/transaction.ts
Expand Up @@ -177,6 +177,8 @@ export interface TransactionMetadata {
* whether or not to scrub identifiers from the transaction name, or replace the entire name with a placeholder.
*/
export type TransactionSource =
/** initialize name */
| 'initialize'
/** User-defined name */
| 'custom'
/** Raw URL, potentially containing identifiers */
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/router.ts
Expand Up @@ -92,7 +92,7 @@ export function vueRouterInstrumentation(router: VueRouter): VueRouterInstrument
if (startTransactionOnPageLoad && isPageLoadNavigation) {
const pageloadTransaction = getActiveTransaction();
if (pageloadTransaction) {
if (pageloadTransaction.metadata.source !== 'custom') {
if (pageloadTransaction.metadata.source !== 'initialize') {
pageloadTransaction.setName(transactionName, transactionSource);
}
pageloadTransaction.setData('params', data.params);
Expand Down