Skip to content

Commit 397c160

Browse files
committed
ref(remix): Add transaction source
1 parent aeac69d commit 397c160

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/remix/src/performance/client.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: Us
6666
name: initPathName,
6767
op: 'pageload',
6868
tags: DEFAULT_TAGS,
69+
metadata: {
70+
source: 'url',
71+
},
6972
});
7073
}
7174

@@ -115,6 +118,7 @@ export function withSentry<P extends Record<string, unknown>, R extends React.FC
115118
_useEffect(() => {
116119
if (activeTransaction && matches && matches.length) {
117120
activeTransaction.setName(matches[matches.length - 1].id);
121+
activeTransaction.setMetadata({ source: 'route' });
118122
}
119123

120124
isBaseLocation = true;
@@ -138,6 +142,9 @@ export function withSentry<P extends Record<string, unknown>, R extends React.FC
138142
name: matches[matches.length - 1].id,
139143
op: 'navigation',
140144
tags: DEFAULT_TAGS,
145+
metadata: {
146+
source: 'route',
147+
},
141148
});
142149
}
143150
}, [location]);

packages/remix/src/utils/instrumentServer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ function wrapRequestHandler(origRequestHandler: RequestHandler): RequestHandler
182182
tags: {
183183
method: request.method,
184184
},
185+
metadata: {
186+
source: 'url',
187+
},
185188
});
186189

187190
if (transaction) {

0 commit comments

Comments
 (0)