Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/tanstackstart-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
},
"dependencies": {
"@opentelemetry/api": "^1.9.1",
"@opentelemetry/semantic-conventions": "^1.40.0",
"@sentry/browser-utils": "10.57.0",
"@sentry/core": "10.57.0",
"@sentry/node": "10.57.0",
"@sentry/react": "10.57.0",
"@sentry/vite-plugin": "^5.3.0"
},
"devDependencies": {
"@sentry/conventions": "^0.11.0",
"vite": "^5.4.11"
},
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions packages/tanstackstart-react/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export default [
'src/server/index.ts',
'src/vite/index.ts',
],
packageSpecificConfig: {
output: {
// keep emitted module paths relative to `src` so the bundled `@sentry/conventions`
// (a devDependency, vendored into the build) doesn't shift the output layout
preserveModulesRoot: 'src',
},
},
}),
),
...makeOtelLoaders('./build', 'sentry-node'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
import { HTTP_ROUTE } from '@sentry/conventions/attributes';
import {
escapeStringForRegex,
getActiveSpan,
Expand Down Expand Up @@ -54,13 +54,13 @@ export function updateSpanWithRouteParametrization(method: string, pathname: str

const rootSpan = getRootSpan(activeSpan);
const rootSpanData = spanToJSON(rootSpan).data;
if (rootSpanData?.[ATTR_HTTP_ROUTE]) {
if (rootSpanData?.[HTTP_ROUTE]) {
return;
}

const transactionName = `${method} ${matchedPattern}`;
updateSpanName(rootSpan, transactionName);
rootSpan.setAttribute(ATTR_HTTP_ROUTE, matchedPattern);
rootSpan.setAttribute(HTTP_ROUTE, matchedPattern);
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
getCurrentScope().setTransactionName(transactionName);
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7578,6 +7578,11 @@
"@sentry/cli-win32-i686" "2.58.6"
"@sentry/cli-win32-x64" "2.58.6"

"@sentry/conventions@^0.11.0":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@sentry/conventions/-/conventions-0.11.0.tgz#5a324b8368dc5c141260bd8ccc684756ea3dd843"
integrity sha512-AQTAKeq9mDpOElDFSPymZTPZF/c50rk355mWTf5Y1ZxZJKKOBli5qTttskJyCxrE5ynNgN1KwcXoU5MRrMSRmQ==

"@sentry/node-cpu-profiler@^2.4.2":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@sentry/node-cpu-profiler/-/node-cpu-profiler-2.4.2.tgz#d0ba01370545297d015df1497daf7f81e27f2ab5"
Expand Down
Loading