@karan171996/metricflow 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +4 -4
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/metrics/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/connect/page.js.nft.json +1 -1
- package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connect.html +2 -2
- package/.next/server/app/connect.rsc +10 -10
- package/.next/server/app/connect.segments/_full.segment.rsc +10 -10
- package/.next/server/app/connect.segments/_index.segment.rsc +7 -7
- package/.next/server/app/connect.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
- package/.next/server/app/performance/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance/page.js.nft.json +1 -1
- package/.next/server/app/performance/page_client-reference-manifest.js +1 -1
- package/.next/server/app/performance.html +2 -2
- package/.next/server/app/performance.rsc +4 -4
- package/.next/server/app/performance.segments/_full.segment.rsc +4 -4
- package/.next/server/app/performance.segments/_index.segment.rsc +3 -3
- package/.next/server/app/performance.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +4 -4
- package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup.html +2 -2
- package/.next/server/app/setup.rsc +4 -4
- package/.next/server/app/setup.segments/_full.segment.rsc +4 -4
- package/.next/server/app/setup.segments/_index.segment.rsc +3 -3
- package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tools/[tool]/page.js.nft.json +1 -1
- package/.next/server/app/tools/[tool]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0fkj1-q._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0o2ceqr._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0xmaf60._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0l4t71c._.js +1 -1
- package/.next/server/chunks/ssr/_0cq6qjs._.js +1 -1
- package/.next/server/chunks/ssr/_0htqt7_._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{3khzw5hn41lt7.js → 2k11j1snr6r1u.js} +1 -1
- package/.next/static/chunks/2lecef5u2sq8u.css +1 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/README.md +54 -239
- package/package.json +1 -1
- package/.next/static/chunks/332sb1iij72mz.css +0 -1
- /package/.next/static/{4kpNMSdt6_Tq6ls8b4gmd → ghd84p9ZJgeGgzFyvxgY0}/_buildManifest.js +0 -0
- /package/.next/static/{4kpNMSdt6_Tq6ls8b4gmd → ghd84p9ZJgeGgzFyvxgY0}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{4kpNMSdt6_Tq6ls8b4gmd → ghd84p9ZJgeGgzFyvxgY0}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
|
|
2
|
-
globalThis.__RSC_MANIFEST["/tools/[tool]/page"] = {"moduleLoading":{"prefix":""},"clientModules":{"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/layout-router.js":{"id":46495,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":90434,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-page.js":{"id":81762,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-segment.js":{"id":90334,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":74882,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":43120,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27499,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/sidebar/Sidebar.tsx":{"id":67097,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/components/ui/sidebar.tsx":{"id":11522,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/components/header/Header.tsx":{"id":17792,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error.js":{"id":3020,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/ToolInsights/ToolInsights.tsx":{"id":98537,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs":{"id":91153,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js":{"id":3547,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs":{"id":78393,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false}},"ssrModuleMapping":{"46495":{"*":{"id":51202,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90434":{"*":{"id":19122,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"81762":{"*":{"id":28239,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90334":{"*":{"id":57748,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"74882":{"*":{"id":41006,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"43120":{"*":{"id":22076,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"27499":{"*":{"id":69888,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"67097":{"*":{"id":30948,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"11522":{"*":{"id":14727,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"17792":{"*":{"id":72347,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"3020":{"*":{"id":17111,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/node_modules__pnpm_0hf3oiy._.js"],"async":false}},"98537":{"*":{"id":13392,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"91153":{"*":{"id":39848,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"3547":{"*":{"id":56561,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"78393":{"*":{"id":13908,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"46495":{"*":{"id":75141,"name":"*","chunks":[],"async":false}},"90434":{"*":{"id":83264,"name":"*","chunks":[],"async":false}},"81762":{"*":{"id":40645,"name":"*","chunks":[],"async":false}},"90334":{"*":{"id":12796,"name":"*","chunks":[],"async":false}},"74882":{"*":{"id":48616,"name":"*","chunks":[],"async":false}},"43120":{"*":{"id":14057,"name":"*","chunks":[],"async":false}},"27499":{"*":{"id":83139,"name":"*","chunks":[],"async":false}},"67097":{"*":{"id":24794,"name":"*","chunks":[],"async":false}},"11522":{"*":{"id":54367,"name":"*","chunks":[],"async":false}},"17792":{"*":{"id":31358,"name":"*","chunks":[],"async":false}},"3020":{"*":{"id":42038,"name":"*","chunks":[],"async":false}},"98537":{"*":{"id":57784,"name":"*","chunks":[],"async":false}},"91153":{"*":{"id":33951,"name":"*","chunks":[],"async":false}},"3547":{"*":{"id":40950,"name":"*","chunks":[],"async":false}},"78393":{"*":{"id":45603,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/app/layout":[{"path":"static/chunks/
|
|
2
|
+
globalThis.__RSC_MANIFEST["/tools/[tool]/page"] = {"moduleLoading":{"prefix":""},"clientModules":{"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/layout-router.js":{"id":46495,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":90434,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-page.js":{"id":81762,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/client-segment.js":{"id":90334,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":74882,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":43120,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27499,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/sidebar/Sidebar.tsx":{"id":67097,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/components/ui/sidebar.tsx":{"id":11522,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/components/header/Header.tsx":{"id":17792,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error.js":{"id":3020,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js"],"async":false},"[project]/components/ToolInsights/ToolInsights.tsx":{"id":98537,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs":{"id":91153,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/app-dir/link.js":{"id":3547,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false},"[project]/node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@19.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@base-ui/react/button/Button.mjs":{"id":78393,"name":"*","chunks":["/_next/static/chunks/2dpz7gbtyu5go.js","/_next/static/chunks/1kqzgl2gb6ily.js","/_next/static/chunks/2h1anqi3hzijd.js"],"async":false}},"ssrModuleMapping":{"46495":{"*":{"id":51202,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90434":{"*":{"id":19122,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"81762":{"*":{"id":28239,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"90334":{"*":{"id":57748,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"74882":{"*":{"id":41006,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"43120":{"*":{"id":22076,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"27499":{"*":{"id":69888,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js"],"async":false}},"67097":{"*":{"id":30948,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"11522":{"*":{"id":14727,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"17792":{"*":{"id":72347,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"3020":{"*":{"id":17111,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/node_modules__pnpm_0hf3oiy._.js"],"async":false}},"98537":{"*":{"id":13392,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"91153":{"*":{"id":39848,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"3547":{"*":{"id":56561,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}},"78393":{"*":{"id":13908,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0qb6-a-._.js","server/chunks/ssr/0x0c_next_dist_0lkq344._.js","server/chunks/ssr/_0_02db6._.js","server/chunks/ssr/_12pw-ix._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"46495":{"*":{"id":75141,"name":"*","chunks":[],"async":false}},"90434":{"*":{"id":83264,"name":"*","chunks":[],"async":false}},"81762":{"*":{"id":40645,"name":"*","chunks":[],"async":false}},"90334":{"*":{"id":12796,"name":"*","chunks":[],"async":false}},"74882":{"*":{"id":48616,"name":"*","chunks":[],"async":false}},"43120":{"*":{"id":14057,"name":"*","chunks":[],"async":false}},"27499":{"*":{"id":83139,"name":"*","chunks":[],"async":false}},"67097":{"*":{"id":24794,"name":"*","chunks":[],"async":false}},"11522":{"*":{"id":54367,"name":"*","chunks":[],"async":false}},"17792":{"*":{"id":31358,"name":"*","chunks":[],"async":false}},"3020":{"*":{"id":42038,"name":"*","chunks":[],"async":false}},"98537":{"*":{"id":57784,"name":"*","chunks":[],"async":false}},"91153":{"*":{"id":33951,"name":"*","chunks":[],"async":false}},"3547":{"*":{"id":40950,"name":"*","chunks":[],"async":false}},"78393":{"*":{"id":45603,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/app/layout":[{"path":"static/chunks/2lecef5u2sq8u.css","inlined":false}],"[project]/app/loading":[{"path":"static/chunks/2lecef5u2sq8u.css","inlined":false}],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/2lecef5u2sq8u.css","inlined":false}],"[project]/app/tools/[tool]/page":[{"path":"static/chunks/2lecef5u2sq8u.css","inlined":false}]},"entryJSFiles":{"[project]/app/layout":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/loading":["static/chunks/2dpz7gbtyu5go.js","static/chunks/1habrj18124lo.js","static/chunks/2h1anqi3hzijd.js"],"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/2dpz7gbtyu5go.js"],"[project]/app/tools/[tool]/page":["static/chunks/2dpz7gbtyu5go.js","static/chunks/1kqzgl2gb6ily.js","static/chunks/2h1anqi3hzijd.js"]}};
|
|
3
3
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57007,e=>{"use strict";async function t(){return Response.json({status:"ok",timestamp:new Date().toISOString(),version:"0.8.
|
|
1
|
+
module.exports=[54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57007,e=>{"use strict";async function t(){return Response.json({status:"ok",timestamp:new Date().toISOString(),version:"0.8.2"})}e.s(["GET",0,t],57007)},84327,e=>{"use strict";var t=e.i(12425),r=e.i(83353),a=e.i(47902),n=e.i(37892),s=e.i(54261),i=e.i(39548),o=e.i(68187),l=e.i(63984),u=e.i(88743),d=e.i(24698),p=e.i(13487),c=e.i(48776),h=e.i(29398),x=e.i(31610),R=e.i(45919),v=e.i(93695),m=e.i(12741);e.i(95315);var g=e.i(98732);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/health/route",pathname:"/api/health",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/health/route.ts",nextConfigOutput:"",userland:()=>e.r(57007),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:E,serverHooks:C}=w;async function y(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/health/route";f=f.replace(/\/index$/,"")||"/";let E=await w.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:y,params:A,nextConfig:T,parsedUrl:b,isDraftMode:S,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:H}=E,j=(0,o.normalizeAppPath)(f),I=!!q.routes[_]&&(w.isDev||(0,m.isRouteCacheOwner)(_,w.cacheOwner,q.routes[_])),M=!!(q.dynamicRoutes[j]||I),D=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,b,!1):t.end("This page could not be found"),null);if(M&&!S){let e=q.dynamicRoutes[j];if(e&&!1===e.fallback&&!I){if(T.adapterPath)return await D();throw new v.NoFallbackError}}let U=null;!M||w.isDev||S||(U="/index"===(U=_)?"/":U);let F=!0===w.isDev||!M,K=M&&!F;H&&k&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:k,serverActionsManifest:H});let L=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),G=!!(null==P?void 0:P.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),X=(0,n.getRequestMeta)(e,"incrementalCache")||await w.getIncrementalCache(e,T,q,V);null==X||X.resetRequestCache(),globalThis.__incrementalCache=X;let W={params:A,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!T.experimental.authInterrupts,useCacheTimeout:T.experimental.useCacheTimeout},cacheComponents:!!T.cacheComponents,validationLevel:T.experimental.instantInsights.validationLevel,isDraftMode:S,supportsDynamicResponse:F,incrementalCache:X,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:T.cacheLife,staticPageGenerationTimeout:T.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>w.onRequestError(e,t,a,n,P)},sharedContext:{buildId:C,deploymentId:y}},z=new l.NodeNextRequest(e),Z=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Q=async({previousCacheEntry:r})=>{try{if(!V&&N&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await w.handle(J,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=W.renderOpts.collectedTags;if(!M)return await (0,c.sendResponse)(z,Z,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[R.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,a=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==r&&r>0?T.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),t}},Y=async(n,i)=>{try{var o,l;let n=await w.handleResponse({req:e,nextConfig:T,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:Q,waitUntil:a.waitUntil,isMinimalMode:V});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&M||s.delete(R.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,x.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(z,Z,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof v.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:N})},!1,P),M)throw t;await (0,c.sendResponse)(z,Z,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||j,o=`${L} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if(G&&B)await Y(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${L} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>Y(e,t)),void 0,!G)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:E})},"routeModule",0,w,"serverHooks",0,C,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,E])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0fkj1-q._.js.map
|
|
@@ -13,6 +13,6 @@ module.exports=[49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},5
|
|
|
13
13
|
timing: ${e(`SELECT percentile(largestContentfulPaint, 75) AS lcp, percentile(cumulativeLayoutShift, 75) AS cls, percentile(interactionToNextPaint, 75) AS inp, percentile(firstInputDelay, 75) AS fid FROM PageViewTiming ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
14
14
|
errors: ${e(`SELECT count(*) AS errors FROM JavaScriptError ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
15
15
|
ajax: ${e(`SELECT average(duration) AS ajaxLatency, count(*) AS ajaxCalls, filter(count(*), WHERE httpResponseCode >= 400 OR httpResponseCode = 0) AS ajaxFailed FROM AjaxRequest ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
16
|
-
} } }`,n=await (0,d.nrGraphql)(this.apiKey,r,15e3),s=n.data?.actor?.account;if(!s?.views)throw Error("rejected");return this.flattenNrAccount(s)}flattenNrAccount(e){let t=e.views?.results??[],r=e.timing?.results??[],a=e.errors?.results??[],n=e.ajax?.results??[],s=new Map;for(let e of t){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of r){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of a){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of n){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}return Array.from(s.values())}mergeVariants(e){if(0===e.length)return null;let t=0,r=0,a=0,n=0,s=0,o=0,i=0,l=0,c=0,u=0,p=0,d=0;for(let h of e){let e=w(h.views);t+=e,r+=1e3*w(h.loadTime)*e,a+=1e3*w(h.ttfb)*e,n+=w(h.apdex)*e,s+=1e3*w(h.lcp)*e,o+=w(h.cls)*e,i+=w(h.inp)*e,l+=w(h.fid)*e,c+=w(h.errors);let f=w(h.ajaxCalls);u+=f,p+=1e3*w(h.ajaxLatency)*f,d+=w(h.ajaxFailed)}let h=t||1;return{loadTime:r/h,lcp:s/h,ttfb:a/h,cls:o/h,inp:i/h,fid:l/h,errorRate:t?c/t*100:0,throughput:t,apdexScore:n/h,...u>0&&{ajaxLatency:p/u,ajaxFailRate:d/u*100}}}},sentry:new class extends p{id="sentry";legacyField="sentry";timingLabel="Sentry: events";get apiKey(){return(0,h.env)("SENTRY_API_KEY")}get dsn(){return(0,h.env)("SENTRY_DSN")}memoKey(){return`${this.apiKey}:${this.dsn}`}emptyPage(){let e={errorCount:0,errorRate:0,warningCount:0,latestErrors:[]};return{metrics:y(e),legacy:e}}async load(){let e=await this.target();if(!e)return{pages:[],byPath:{},legacy:{}};let[t,r]=await Promise.all([this.query(e,v),this.query(e,S)]),a=this.aggregateRows(t),o=function(e){let t={};for(let r of e){let e=String(r["url.full"]??""),a=n(e)?s(e):null;if(null===a)continue;let o=Number(r["count_sample()"]??0)||0,i=t[a]??={count:0,sums:{}};for(let e of(i.count+=o,Object.keys(x))){let t=r[x[e]];if("number"!=typeof t||!Number.isFinite(t))continue;let a=i.sums[e]??={total:0,weight:0};a.total+=t*(o||1),a.weight+=o||1}}return Object.fromEntries(Object.entries(t).map(([e,t])=>{let r=Object.fromEntries(Object.entries(t.sums).map(([e,t])=>[e,t.total/t.weight]));return[e,{traffic:{count:t.count,sampled:!0},...Object.keys(r).length>0&&{vitals:r}}]}))}(r),i=Object.fromEntries(Object.entries(o).map(([e,t])=>[e,t.traffic.count]));for(let e of t){let t=String(e.url??""),r=n(t)?s(t):null;null!==r&&(i[r]??=0)}let l={};for(let e of new Set([...Object.keys(a),...Object.keys(o)]))a[e]??=this.emptyPage().legacy,l[e]={...y(a[e]),...o[e]};return{pages:Object.entries(i).map(([e,t])=>({url:e,views:t})),byPath:l,legacy:a}}async update(e){return{results:await _(e.SENTRY_API_KEY,e.SENTRY_DSN)}}async fetchRows(){let e=await this.target();return e?this.query(e,v):[]}async target(){let e=(0,N.parseSentryDsn)(this.dsn);if(!e.ok)throw Error("invalid DSN");let t=await (0,N.orgSlugForDsn)(this.apiKey,e);return t?{parsed:e,slug:t}:null}async query({parsed:e,slug:r},a){let n=await t.default.get(`${e.apiBase}/organizations/${encodeURIComponent(r)}/events/`,{headers:{Authorization:`Bearer ${this.apiKey}`},timeout:1e4,params:{project:e.projectId,statsPeriod:"24h",per_page:100,...a},paramsSerializer:{indexes:null}});return n.data?.data??[]}mergeVariants(e){if(0===e.length)return null;let t=0,r=[];for(let a of e){let e=Number(a["count()"]??0);t+=e,r.length<5&&r.push({title:a.title??"Unknown error",count:e,lastSeen:a["last_seen()"]??""})}return{errorCount:t,errorRate:0,warningCount:0,latestErrors:r}}}};e.s(["SERVER_TOOLS",0,b],71288)},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),a=e.i(39151),n=e.i(19374);function s(e,t=[],r=[]){let o,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(n.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(o=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(i.name)).charAt(0).toUpperCase()+o.slice(1)),l}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let i=s(o),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=s(l);function u(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),a=e<0?"-":"";return r<3600?`${a}${Math.floor(r/60)}m ${r%60}s`:`${a}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],d=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,h=e=>void 0===e?"—":u(e),f=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>f(e)?.count??0,g={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:u(d(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:u(d(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:u(d(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:d(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>u(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>u(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>u(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let t=e.newRelic.inp;return void 0===t?"—":u(t)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>y(t)>(e?y(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(y).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>y(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(y(e))},{needs:"errors",header:"Latest Error",cell:e=>f(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(f(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>h(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>h(e.byTool?.sentry?.vitals?.inp)}]}},m=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,t])=>[e,t.label])),E=Object.keys(g);e.s(["KEY_LABELS",0,m,"TOOLS",0,g,"TOOL_IDS",0,E,"mergeMetrics",0,function(e,t,r){let a={};for(let[n,s]of Object.entries(t)){let t=r.includes(s)?void 0:e[s]?.[n];void 0!==t&&(a[n]=t)}return a},"sourcesFor",0,function(e){let t={};for(let r of p){let a=E.find(t=>e.includes(t)&&g[t].capabilities.includes(r));a&&(t[r]=a)}return t}],67119);let w=E.flatMap(e=>g[e].keys.required),R="NEWRELIC_REGION",I={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},N={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},v="AI_PROVIDER";function x(e){return process.env[e]??""}let S=e=>g[e].keys.required.every(e=>x(e));function _(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let b=/[\s\0#"'`\\$]/;class C extends Error{}e.s(["AI_PROVIDERS",0,N,"AI_PROVIDER_KEY",0,v,"EnvWriteRefused",0,C,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,R,"SETUP_KEYS",0,w,"UNSAFE",0,b,"activeAi",0,function(){let e=process.env[v];for(let t of(e&&e in N?[e]:[]).concat(Object.keys(N))){let e=process.env[N[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>E.filter(S),"env",0,x,"isToolConnected",0,S,"nrHosts",0,(e="eu"===process.env[R]?"eu":"us")=>I[e],"projectDir",0,_,"writeEnvLocal",0,function(e,a=process.env.METRICFLOW_ENV_FILE||(0,r.join)(_(),".env.local")){let n=new Set([...Object.values(g).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(N).map(e=>e.key),v]);for(let[t,r]of Object.entries(e)){if(!n.has(t))throw new C("Refused to write a key name no tool declares.");if(b.test(r))throw new C("Refused to write a value with unsafe characters.")}let s=(0,t.existsSync)(a)?(0,t.readFileSync)(a,"utf8").split("\n"):[],o=new Map(Object.entries(e)),i=s.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,t]of o)i.push(`${e}=${t}`);let l=`${a}.tmp`;for(let[r,n]of((0,t.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,t.renameSync)(l,a),Object.entries(e)))process.env[r]=n}],12892)},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function a(e,n=()=>!1){let s,o;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(s=await e((0,r.nrHosts)("us")),!n(s))return s}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;o=r}try{let t=await e((0,r.nrHosts)("eu"));if(!n(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(o)throw o;return s}async function n(e,r,n){return(await a(a=>t.default.post(a.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:n}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,n,"withRegion",0,a])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function a(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let a=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(a))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let n=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),s=n?n[2]:t.host;return{ok:!0,projectId:a,orgId:n?n[1]:null,apiBase:`${t.protocol}//${s}/api/0`}}async function n(e,r){let a={Authorization:`Bearer ${e}`},n=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:a,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:a,timeout:8e3}),s=Array.isArray(n.data)?n.data:[];return(r.orgId?s.find(e=>String(e.id)===r.orgId)?.slug:s.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,n,"parseSentryDsn",0,a,"publicDsn",0,function(e){let t=a(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
|
|
16
|
+
} } }`,n=await (0,d.nrGraphql)(this.apiKey,r,15e3),s=n.data?.actor?.account;if(!s?.views)throw Error("rejected");return this.flattenNrAccount(s)}flattenNrAccount(e){let t=e.views?.results??[],r=e.timing?.results??[],a=e.errors?.results??[],n=e.ajax?.results??[],s=new Map;for(let e of t){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of r){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of a){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}for(let e of n){let t=String(e.pageUrl??e.facet??"");s.set(t,{...s.get(t),...e})}return Array.from(s.values())}mergeVariants(e){if(0===e.length)return null;let t=0,r=0,a=0,n=0,s=0,o=0,i=0,l=0,c=0,u=0,p=0,d=0;for(let h of e){let e=w(h.views);t+=e,r+=1e3*w(h.loadTime)*e,a+=1e3*w(h.ttfb)*e,n+=w(h.apdex)*e,s+=1e3*w(h.lcp)*e,o+=w(h.cls)*e,i+=w(h.inp)*e,l+=w(h.fid)*e,c+=w(h.errors);let f=w(h.ajaxCalls);u+=f,p+=1e3*w(h.ajaxLatency)*f,d+=w(h.ajaxFailed)}let h=t||1;return{loadTime:r/h,lcp:s/h,ttfb:a/h,cls:o/h,inp:i/h,fid:l/h,errorRate:t?c/t*100:0,throughput:t,apdexScore:n/h,...u>0&&{ajaxLatency:p/u,ajaxFailRate:d/u*100}}}},sentry:new class extends p{id="sentry";legacyField="sentry";timingLabel="Sentry: events";get apiKey(){return(0,h.env)("SENTRY_API_KEY")}get dsn(){return(0,h.env)("SENTRY_DSN")}memoKey(){return`${this.apiKey}:${this.dsn}`}emptyPage(){let e={errorCount:0,errorRate:0,warningCount:0,latestErrors:[]};return{metrics:y(e),legacy:e}}async load(){let e=await this.target();if(!e)return{pages:[],byPath:{},legacy:{}};let[t,r]=await Promise.all([this.query(e,v),this.query(e,S)]),a=t.filter(e=>n(String(e.url??""))),o=this.aggregateRows(a),i=function(e){let t={};for(let r of e){let e=String(r["url.full"]??""),a=n(e)?s(e):null;if(null===a)continue;let o=Number(r["count_sample()"]??0)||0,i=t[a]??={count:0,sums:{}};for(let e of(i.count+=o,Object.keys(x))){let t=r[x[e]];if("number"!=typeof t||!Number.isFinite(t))continue;let a=i.sums[e]??={total:0,weight:0};a.total+=t*(o||1),a.weight+=o||1}}return Object.fromEntries(Object.entries(t).map(([e,t])=>{let r=Object.fromEntries(Object.entries(t.sums).map(([e,t])=>[e,t.total/t.weight]));return[e,{traffic:{count:t.count,sampled:!0},...Object.keys(r).length>0&&{vitals:r}}]}))}(r),l=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,t.traffic.count]));for(let e of Object.keys(o))l[e]??=0;let c={};for(let e of new Set([...Object.keys(o),...Object.keys(i)]))o[e]??=this.emptyPage().legacy,c[e]={...y(o[e]),...i[e]};return{pages:Object.entries(l).map(([e,t])=>({url:e,views:t})),byPath:c,legacy:o}}async update(e){return{results:await _(e.SENTRY_API_KEY,e.SENTRY_DSN)}}async fetchRows(){let e=await this.target();return e?this.query(e,v):[]}async target(){let e=(0,N.parseSentryDsn)(this.dsn);if(!e.ok)throw Error("invalid DSN");let t=await (0,N.orgSlugForDsn)(this.apiKey,e);return t?{parsed:e,slug:t}:null}async query({parsed:e,slug:r},a){let n=await t.default.get(`${e.apiBase}/organizations/${encodeURIComponent(r)}/events/`,{headers:{Authorization:`Bearer ${this.apiKey}`},timeout:1e4,params:{project:e.projectId,statsPeriod:"24h",per_page:100,...a},paramsSerializer:{indexes:null}});return n.data?.data??[]}mergeVariants(e){if(0===e.length)return null;let t=0,r=[];for(let a of e){let e=Number(a["count()"]??0);t+=e,r.length<5&&r.push({title:a.title??"Unknown error",count:e,lastSeen:a["last_seen()"]??""})}return{errorCount:t,errorRate:0,warningCount:0,latestErrors:r}}}};e.s(["SERVER_TOOLS",0,b],71288)},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},12892,67119,e=>{"use strict";var t=e.i(2157),r=e.i(50227),a=e.i(39151),n=e.i(19374);function s(e,t=[],r=[]){let o,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,t,r):e,l=(0,a.forwardRef)(({className:e,...t},r)=>(0,a.createElement)(n.default,{ref:r,icon:i,className:e,...t}));return i.name&&(l.displayName=(o=(e=>{let t="",r=!1;for(let a of e){if("-"===a||"_"===a||a<=" "){r=t.length>0;continue}0===t.length?t+=a.toLowerCase():t+=r?a.toUpperCase():a,r=!1}return t})(i.name)).charAt(0).toUpperCase()+o.slice(1)),l}let o={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};o.node;let i=s(o),l={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};l.node;let c=s(l);function u(e){if(!Number.isFinite(e))return"—";let t=Math.abs(Math.round(e));if(t<1e3)return`${Math.round(e)}ms`;if(t<59950)return`${+(e/1e3).toFixed(1)}s`;let r=Math.round(t/1e3),a=e<0?"-":"";return r<3600?`${a}${Math.floor(r/60)}m ${r%60}s`:`${a}${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}let p=["pages","traffic","loadTime","apdex","vitals","ajax","errorRate","errors"],d=e=>e.length?e.reduce((e,t)=>e+t,0)/e.length:0,h=e=>void 0===e?"—":u(e),f=e=>e.byTool?.sentry?.errors??(e.sentry&&{count:e.sentry.errorCount,latest:e.sentry.latestErrors}),y=e=>f(e)?.count??0,g={"new-relic":{label:"New Relic",icon:i,description:"Real-user performance per page: load time, Core Web Vitals, throughput and Apdex.",connectReason:"Add your New Relic keys to see load time and Core Web Vitals for each page.",setupNote:"The key that sends events (Ingest - License) is separate and is added later on the Connect page.",keys:{required:["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID"],optional:["NEWRELIC_INSERT_KEY"],derived:["NEWRELIC_REGION"]},capabilities:["pages","traffic","loadTime","apdex","vitals","ajax","errorRate"],stats:e=>[{label:"Avg Load Time",value:u(d(e.map(e=>e.newRelic.loadTime)))},{label:"Avg LCP",value:u(d(e.map(e=>e.newRelic.lcp)))},{label:"Avg TTFB",value:u(d(e.map(e=>e.newRelic.ttfb)))},{label:"Avg Apdex",value:d(e.map(e=>e.newRelic.apdexScore)).toFixed(2)}],columns:[{needs:"loadTime",header:"Load",cell:e=>u(e.newRelic.loadTime)},{needs:"vitals",header:"LCP",cell:e=>u(e.newRelic.lcp)},{needs:"vitals",header:"TTFB",cell:e=>u(e.newRelic.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.newRelic.cls.toFixed(2)},{needs:"vitals",header:"INP",cell:e=>{let t=e.newRelic.inp;return void 0===t?"—":u(t)}},{needs:"errorRate",header:"Error Rate",cell:e=>`${e.newRelic.errorRate.toFixed(2)}%`},{needs:"traffic",header:"Throughput",cell:e=>e.newRelic.throughput.toLocaleString()},{needs:"apdex",header:"Apdex",cell:e=>e.newRelic.apdexScore.toFixed(2)}]},sentry:{label:"Sentry",icon:c,description:"Errors per page over the last 24 hours, with page loads and web vitals when your site sends traces.",connectReason:"Add your Sentry keys to see the errors on each page.",keys:{required:["SENTRY_API_KEY","SENTRY_DSN"],optional:[]},capabilities:["pages","traffic","vitals","errors"],stats:e=>{let t=e.reduce((e,t)=>y(t)>(e?y(e):0)?t:e,null);return[{label:"Total Errors",value:String(e.map(y).reduce((e,t)=>e+t,0))},{label:"Pages With Errors",value:`${e.filter(e=>y(e)>0).length} of ${e.length}`},{label:"Noisiest Page",value:t?.name??"None"}]},columns:[{needs:"errors",header:"Errors",cell:e=>String(y(e))},{needs:"errors",header:"Latest Error",cell:e=>f(e)?.latest[0]?.title??"—"},{needs:"errors",header:"Last Seen",cell:e=>{let t=Date.parse(f(e)?.latest[0]?.lastSeen??"");return Number.isNaN(t)?"—":new Date(t).toLocaleString()}},{needs:"traffic",header:"Page loads (sampled)",cell:e=>e.byTool?.sentry?.traffic?.count.toLocaleString()??"—"},{needs:"vitals",header:"LCP",cell:e=>h(e.byTool?.sentry?.vitals?.lcp)},{needs:"vitals",header:"TTFB",cell:e=>h(e.byTool?.sentry?.vitals?.ttfb)},{needs:"vitals",header:"CLS",cell:e=>e.byTool?.sentry?.vitals?.cls?.toFixed(2)??"—"},{needs:"vitals",header:"INP",cell:e=>h(e.byTool?.sentry?.vitals?.inp)}]}},m=Object.fromEntries(Object.entries({NEWRELIC_API_KEY:{label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID:{label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},SENTRY_API_KEY:{label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},SENTRY_DSN:{label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}}).map(([e,t])=>[e,t.label])),E=Object.keys(g);e.s(["KEY_LABELS",0,m,"TOOLS",0,g,"TOOL_IDS",0,E,"mergeMetrics",0,function(e,t,r){let a={};for(let[n,s]of Object.entries(t)){let t=r.includes(s)?void 0:e[s]?.[n];void 0!==t&&(a[n]=t)}return a},"sourcesFor",0,function(e){let t={};for(let r of p){let a=E.find(t=>e.includes(t)&&g[t].capabilities.includes(r));a&&(t[r]=a)}return t}],67119);let w=E.flatMap(e=>g[e].keys.required),R="NEWRELIC_REGION",I={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},N={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},v="AI_PROVIDER";function x(e){return process.env[e]??""}let S=e=>g[e].keys.required.every(e=>x(e));function _(){return process.env.METRICFLOW_PROJECT_DIR||process.cwd()}let b=/[\s\0#"'`\\$]/;class C extends Error{}e.s(["AI_PROVIDERS",0,N,"AI_PROVIDER_KEY",0,v,"EnvWriteRefused",0,C,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,R,"SETUP_KEYS",0,w,"UNSAFE",0,b,"activeAi",0,function(){let e=process.env[v];for(let t of(e&&e in N?[e]:[]).concat(Object.keys(N))){let e=process.env[N[t].key];if(e)return{provider:t,key:e}}return null},"connectedTools",0,()=>E.filter(S),"env",0,x,"isToolConnected",0,S,"nrHosts",0,(e="eu"===process.env[R]?"eu":"us")=>I[e],"projectDir",0,_,"writeEnvLocal",0,function(e,a=process.env.METRICFLOW_ENV_FILE||(0,r.join)(_(),".env.local")){let n=new Set([...Object.values(g).flatMap(e=>[...e.keys.required,...e.keys.optional,...e.keys.derived??[]]),...Object.values(N).map(e=>e.key),v]);for(let[t,r]of Object.entries(e)){if(!n.has(t))throw new C("Refused to write a key name no tool declares.");if(b.test(r))throw new C("Refused to write a value with unsafe characters.")}let s=(0,t.existsSync)(a)?(0,t.readFileSync)(a,"utf8").split("\n"):[],o=new Map(Object.entries(e)),i=s.map(e=>{let t=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(t&&o.has(t)){let e=o.get(t);return o.delete(t),`${t}=${e}`}return e});for(;i.length&&""===i[i.length-1];)i.pop();for(let[e,t]of o)i.push(`${e}=${t}`);let l=`${a}.tmp`;for(let[r,n]of((0,t.writeFileSync)(l,i.join("\n")+"\n",{mode:384}),(0,t.renameSync)(l,a),Object.entries(e)))process.env[r]=n}],12892)},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function a(e,n=()=>!1){let s,o;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(s=await e((0,r.nrHosts)("us")),!n(s))return s}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;o=r}try{let t=await e((0,r.nrHosts)("eu"));if(!n(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(o)throw o;return s}async function n(e,r,n){return(await a(a=>t.default.post(a.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:n}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,n,"withRegion",0,a])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function a(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let a=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(a))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let n=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),s=n?n[2]:t.host;return{ok:!0,projectId:a,orgId:n?n[1]:null,apiBase:`${t.protocol}//${s}/api/0`}}async function n(e,r){let a={Authorization:`Bearer ${e}`},n=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:a,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:a,timeout:8e3}),s=Array.isArray(n.data)?n.data:[];return(r.orgId?s.find(e=>String(e.id)===r.orgId)?.slug:s.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,n,"parseSentryDsn",0,a,"publicDsn",0,function(e){let t=a(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])},27252,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(18286).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/.pnpm/lucide-react@1.47.0_react@19.2.8/node_modules/lucide-react/dist/esm/Icon.mjs","default")},19374,e=>{"use strict";var t=e.i(27252);e.n(t)},18286,(e,t,r)=>{"use strict";t.exports=e.r(99403).vendored["react-rsc"].ReactServerDOMTurbopackServer}];
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0o2ceqr._.js.map
|
|
@@ -13,6 +13,6 @@ module.exports=[66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:cr
|
|
|
13
13
|
timing: ${e(`SELECT percentile(largestContentfulPaint, 75) AS lcp, percentile(cumulativeLayoutShift, 75) AS cls, percentile(interactionToNextPaint, 75) AS inp, percentile(firstInputDelay, 75) AS fid FROM PageViewTiming ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
14
14
|
errors: ${e(`SELECT count(*) AS errors FROM JavaScriptError ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
15
15
|
ajax: ${e(`SELECT average(duration) AS ajaxLatency, count(*) AS ajaxCalls, filter(count(*), WHERE httpResponseCode >= 400 OR httpResponseCode = 0) AS ajaxFailed FROM AjaxRequest ${a} FACET pageUrl ${t} LIMIT 200`)}
|
|
16
|
-
} } }`,n=await (0,h.nrGraphql)(this.apiKey,r,15e3),o=n.data?.actor?.account;if(!o?.views)throw Error("rejected");return this.flattenNrAccount(o)}flattenNrAccount(e){let t=e.views?.results??[],r=e.timing?.results??[],a=e.errors?.results??[],n=e.ajax?.results??[],o=new Map;for(let e of t){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of r){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of a){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of n){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}return Array.from(o.values())}mergeVariants(e){if(0===e.length)return null;let t=0,r=0,a=0,n=0,o=0,s=0,i=0,l=0,u=0,c=0,p=0,h=0;for(let d of e){let e=w(d.views);t+=e,r+=1e3*w(d.loadTime)*e,a+=1e3*w(d.ttfb)*e,n+=w(d.apdex)*e,o+=1e3*w(d.lcp)*e,s+=w(d.cls)*e,i+=w(d.inp)*e,l+=w(d.fid)*e,u+=w(d.errors);let f=w(d.ajaxCalls);c+=f,p+=1e3*w(d.ajaxLatency)*f,h+=w(d.ajaxFailed)}let d=t||1;return{loadTime:r/d,lcp:o/d,ttfb:a/d,cls:s/d,inp:i/d,fid:l/d,errorRate:t?u/t*100:0,throughput:t,apdexScore:n/d,...c>0&&{ajaxLatency:p/c,ajaxFailRate:h/c*100}}}},sentry:new class extends p{id="sentry";legacyField="sentry";timingLabel="Sentry: events";get apiKey(){return(0,d.env)("SENTRY_API_KEY")}get dsn(){return(0,d.env)("SENTRY_DSN")}memoKey(){return`${this.apiKey}:${this.dsn}`}emptyPage(){let e={errorCount:0,errorRate:0,warningCount:0,latestErrors:[]};return{metrics:g(e),legacy:e}}async load(){let e=await this.target();if(!e)return{pages:[],byPath:{},legacy:{}};let[t,r]=await Promise.all([this.query(e,R),this.query(e,C)]),a=this.aggregateRows(
|
|
16
|
+
} } }`,n=await (0,h.nrGraphql)(this.apiKey,r,15e3),o=n.data?.actor?.account;if(!o?.views)throw Error("rejected");return this.flattenNrAccount(o)}flattenNrAccount(e){let t=e.views?.results??[],r=e.timing?.results??[],a=e.errors?.results??[],n=e.ajax?.results??[],o=new Map;for(let e of t){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of r){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of a){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}for(let e of n){let t=String(e.pageUrl??e.facet??"");o.set(t,{...o.get(t),...e})}return Array.from(o.values())}mergeVariants(e){if(0===e.length)return null;let t=0,r=0,a=0,n=0,o=0,s=0,i=0,l=0,u=0,c=0,p=0,h=0;for(let d of e){let e=w(d.views);t+=e,r+=1e3*w(d.loadTime)*e,a+=1e3*w(d.ttfb)*e,n+=w(d.apdex)*e,o+=1e3*w(d.lcp)*e,s+=w(d.cls)*e,i+=w(d.inp)*e,l+=w(d.fid)*e,u+=w(d.errors);let f=w(d.ajaxCalls);c+=f,p+=1e3*w(d.ajaxLatency)*f,h+=w(d.ajaxFailed)}let d=t||1;return{loadTime:r/d,lcp:o/d,ttfb:a/d,cls:s/d,inp:i/d,fid:l/d,errorRate:t?u/t*100:0,throughput:t,apdexScore:n/d,...c>0&&{ajaxLatency:p/c,ajaxFailRate:h/c*100}}}},sentry:new class extends p{id="sentry";legacyField="sentry";timingLabel="Sentry: events";get apiKey(){return(0,d.env)("SENTRY_API_KEY")}get dsn(){return(0,d.env)("SENTRY_DSN")}memoKey(){return`${this.apiKey}:${this.dsn}`}emptyPage(){let e={errorCount:0,errorRate:0,warningCount:0,latestErrors:[]};return{metrics:g(e),legacy:e}}async load(){let e=await this.target();if(!e)return{pages:[],byPath:{},legacy:{}};let[t,r]=await Promise.all([this.query(e,R),this.query(e,C)]),a=t.filter(e=>n(String(e.url??""))),s=this.aggregateRows(a),i=function(e){let t={};for(let r of e){let e=String(r["url.full"]??""),a=n(e)?o(e):null;if(null===a)continue;let s=Number(r["count_sample()"]??0)||0,i=t[a]??={count:0,sums:{}};for(let e of(i.count+=s,Object.keys(_))){let t=r[_[e]];if("number"!=typeof t||!Number.isFinite(t))continue;let a=i.sums[e]??={total:0,weight:0};a.total+=t*(s||1),a.weight+=s||1}}return Object.fromEntries(Object.entries(t).map(([e,t])=>{let r=Object.fromEntries(Object.entries(t.sums).map(([e,t])=>[e,t.total/t.weight]));return[e,{traffic:{count:t.count,sampled:!0},...Object.keys(r).length>0&&{vitals:r}}]}))}(r),l=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,t.traffic.count]));for(let e of Object.keys(s))l[e]??=0;let u={};for(let e of new Set([...Object.keys(s),...Object.keys(i)]))s[e]??=this.emptyPage().legacy,u[e]={...g(s[e]),...i[e]};return{pages:Object.entries(l).map(([e,t])=>({url:e,views:t})),byPath:u,legacy:s}}async update(e){return{results:await L(e.SENTRY_API_KEY,e.SENTRY_DSN)}}async fetchRows(){let e=await this.target();return e?this.query(e,R):[]}async target(){let e=(0,I.parseSentryDsn)(this.dsn);if(!e.ok)throw Error("invalid DSN");let t=await (0,I.orgSlugForDsn)(this.apiKey,e);return t?{parsed:e,slug:t}:null}async query({parsed:e,slug:r},a){let n=await t.default.get(`${e.apiBase}/organizations/${encodeURIComponent(r)}/events/`,{headers:{Authorization:`Bearer ${this.apiKey}`},timeout:1e4,params:{project:e.projectId,statsPeriod:"24h",per_page:100,...a},paramsSerializer:{indexes:null}});return n.data?.data??[]}mergeVariants(e){if(0===e.length)return null;let t=0,r=[];for(let a of e){let e=Number(a["count()"]??0);t+=e,r.length<5&&r.push({title:a.title??"Unknown error",count:e,lastSeen:a["last_seen()"]??""})}return{errorCount:t,errorRate:0,warningCount:0,latestErrors:r}}}};e.s(["SERVER_TOOLS",0,A],71288)},90770,e=>{"use strict";let t=new Map;e.s(["getTimings",0,function(){return Array.from(t.entries()).map(([e,t])=>({name:e,value:t})).sort((e,t)=>t.value-e.value)},"recordTiming",0,function(e,r){t.set(e,Math.round(r))}])},84594,e=>{"use strict";var t=e.i(60756),r=e.i(12892);async function a(e,n=()=>!1){let o,s;if(process.env[r.REGION_KEY])return e((0,r.nrHosts)());try{if(o=await e((0,r.nrHosts)("us")),!n(o))return o}catch(r){let e=t.default.isAxiosError(r)?r.response?.status:void 0;if(401!==e&&403!==e)throw r;s=r}try{let t=await e((0,r.nrHosts)("eu"));if(!n(t))return process.env[r.REGION_KEY]="eu",t}catch{}if(s)throw s;return o}async function n(e,r,n){return(await a(a=>t.default.post(a.graphql,{query:r},{headers:{"API-Key":e,"Content-Type":"application/json"},timeout:n}),e=>!e.data?.data?.actor)).data}e.s(["nrGraphql",0,n,"withRegion",0,a])},83808,e=>{"use strict";var t=e.i(60756);let r=new Set(["localhost","127.0.0.1","[::1]"]);function a(e){let t;try{t=new URL(e)}catch{return{ok:!1,error:"Sentry DSN is not a valid URL."}}if("https:"!==t.protocol&&"http:"!==t.protocol)return{ok:!1,error:"Sentry DSN must be an http(s) URL."};if(t.password)return{ok:!1,error:"This is a legacy DSN that contains a secret key. Copy the DSN from Project settings > Client Keys."};if("http:"===t.protocol&&!r.has(t.hostname))return{ok:!1,error:"Sentry DSN must use https (http is only accepted for localhost)."};if(!t.username)return{ok:!1,error:"Sentry DSN is missing its public key."};let a=t.pathname.replace(/^\/|\/$/g,"");if(!/^\d+$/.test(a))return{ok:!1,error:"Sentry DSN is missing a numeric project id."};let n=t.host.match(/^o(\d+)\.ingest\.(.+)$/i),o=n?n[2]:t.host;return{ok:!0,projectId:a,orgId:n?n[1]:null,apiBase:`${t.protocol}//${o}/api/0`}}async function n(e,r){let a={Authorization:`Bearer ${e}`},n=r.orgId?await t.default.get(`${r.apiBase}/organizations/`,{headers:a,timeout:8e3}):await t.default.get(`${r.apiBase}/projects/`,{headers:a,timeout:8e3}),o=Array.isArray(n.data)?n.data:[];return(r.orgId?o.find(e=>String(e.id)===r.orgId)?.slug:o.find(e=>String(e.id)===r.projectId)?.organization?.slug)??null}e.s(["orgSlugForDsn",0,n,"parseSentryDsn",0,a,"publicDsn",0,function(e){let t=a(e);if(!t.ok)return null;let r=new URL(e);return`${r.protocol}//${r.username}@${r.host}/${t.projectId}`},"sentryHostNotice",0,function(e){let t=new URL(e).hostname;return"sentry.io"===t||t.endsWith(".sentry.io")?null:`Your Sentry token will be sent to ${t}, which is not sentry.io. Continue only if that is your own Sentry server.`}])}];
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0xmaf60._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},71385,a=>{a.v("/_next/static/media/icon.23mz8iwcatff2.svg"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},48760,a=>{"use strict";let b={src:a.i(71385).default,width:32,height:32};a.s(["default",0,b])},68915,a=>{"use strict";a.s(["ConnectPage",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ConnectPage() from the server but ConnectPage is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Connect/ConnectPage.tsx","ConnectPage")},76651,a=>{"use strict";var b=a.i(68915);a.n(b)},24445,a=>{"use strict";var b=a.i(91396);a.i(90103);var c=a.i(24084),d=a.i(97728);a.i(59682);var e=a.i(22381),f=a.i(76651);a.s(["default",0,function(){return(0,b.jsxs)(d.SidebarProvider,{children:[(0,b.jsx)(c.AppSidebar,{}),(0,b.jsxs)(d.SidebarInset,{className:"bg-dash-surface",children:[(0,b.jsx)(e.Header,{}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col p-6 md:p-8 max-w-[1600px] mx-auto w-full",children:[(0,b.jsx)("h1",{className:"title-enter text-2xl font-bold text-white tracking-tight mb-2",children:"Connect your app"}),(0,b.jsx)("p",{className:"text-sm text-gray-400 mb-6",children:"
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},71385,a=>{a.v("/_next/static/media/icon.23mz8iwcatff2.svg"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},48760,a=>{"use strict";let b={src:a.i(71385).default,width:32,height:32};a.s(["default",0,b])},68915,a=>{"use strict";a.s(["ConnectPage",()=>b]);let b=(0,a.i(18060).registerClientReference)(function(){throw Error("Attempted to call ConnectPage() from the server but ConnectPage is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Connect/ConnectPage.tsx","ConnectPage")},76651,a=>{"use strict";var b=a.i(68915);a.n(b)},24445,a=>{"use strict";var b=a.i(91396);a.i(90103);var c=a.i(24084),d=a.i(97728);a.i(59682);var e=a.i(22381),f=a.i(76651);a.s(["default",0,function(){return(0,b.jsxs)(d.SidebarProvider,{children:[(0,b.jsx)(c.AppSidebar,{}),(0,b.jsxs)(d.SidebarInset,{className:"bg-dash-surface",children:[(0,b.jsx)(e.Header,{}),(0,b.jsxs)("div",{className:"flex flex-1 flex-col p-6 md:p-8 max-w-[1600px] mx-auto w-full",children:[(0,b.jsx)("h1",{className:"title-enter text-2xl font-bold text-white tracking-tight mb-2",children:"Connect your app"}),(0,b.jsx)("p",{className:"text-sm text-gray-400 mb-6",children:"Add one call to your site so its metrics and errors show up here."}),(0,b.jsx)(f.ConnectPage,{})]})]})]})}],24445)},95202,function(a){a.n(a.i(24445))},41619,a=>{"use strict";var b=a.i(46797),c=a.i(282),d=a.i(89196);a.i(60796);let e=(0,b.instrumentModuleGetter)(()=>a.r(48760)),f=(0,b.instrumentModuleGetter)(()=>a.r(70864)),g=(0,b.instrumentModuleGetter)(()=>a.r(45538)),h=(0,b.instrumentModuleGetter)(()=>a.r(54254)),i=(0,b.instrumentModuleGetter)(()=>a.r(73833)),j=(0,b.instrumentModuleGetter)(()=>a.r(35191)),k=(0,b.instrumentModuleGetter)(()=>a.r(68119)),l=["",{children:["connect",{children:["__PAGE__",{},{metadata:{},page:[(0,b.instrumentModuleGetter)(()=>a.r(95202)),"[project]/app/connect/page.tsx"]},[]]},{metadata:{}},[]]},{metadata:{icon:[async()=>{let a=(0,d.interopDefault)(await e());return[{url:`/icon.svg?${a.src.split("/").splice(-1)[0]}`,sizes:"any",type:"image/svg+xml"}]}]},layout:[f,"[project]/app/layout.tsx"],loading:[g,"[project]/app/loading.tsx"],"not-found":[h,"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/not-found.js"],forbidden:[i,"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/forbidden.js"],unauthorized:[j,"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/unauthorized.js"],"global-error":[k,"[project]/node_modules/.pnpm/next@16.3.8_@babel+core@7.29.7_supports-color@8.1.1__@opentelemetry+api@1.9.1_@types+no_c2c791d25241ae4161c9f48ecf186c77/node_modules/next/dist/client/components/builtin/global-error.js"]},[]],m=a.r.bind(a),n=a.l.bind(a),o=(0,c.createAppPageEntrypoint)({tree:l,page:"/connect/page",pathname:"/connect",require:m,loadChunk:n,interopDefault:d.interopDefault}),p=o.__next_app__,q=o.routeModule,r=o.handler;a.s(["__next_app__",0,p,"handler",0,r,"routeModule",0,q],52071),a.i(52071);var s=a.i(25948);a.s(["ClientPageRoot",()=>s.ClientPageRoot,"ClientSegmentRoot",()=>s.ClientSegmentRoot,"Fragment",()=>s.Fragment,"HTTPAccessFallbackBoundary",()=>s.HTTPAccessFallbackBoundary,"InstantValidation",()=>s.InstantValidation,"LayoutRouter",()=>s.LayoutRouter,"LoadingBoundaryProvider",()=>s.LoadingBoundaryProvider,"Postpone",()=>s.Postpone,"RenderFromTemplateContext",()=>s.RenderFromTemplateContext,"RootLayoutBoundary",()=>s.RootLayoutBoundary,"SegmentViewNode",()=>s.SegmentViewNode,"SegmentViewStateNode",()=>s.SegmentViewStateNode,"__next_app__",0,p,"captureOwnerStack",()=>s.captureOwnerStack,"collectPrefetchHints",()=>s.collectPrefetchHints,"collectSegmentData",()=>s.collectSegmentData,"createElement",()=>s.createElement,"createMetadataComponents",()=>s.createMetadataComponents,"createPrerenderParamsForClientSegment",()=>s.createPrerenderParamsForClientSegment,"createPrerenderSearchParamsForClientPage",()=>s.createPrerenderSearchParamsForClientPage,"createServerParamsForServerSegment",()=>s.createServerParamsForServerSegment,"createServerSearchParamsForServerPage",()=>s.createServerSearchParamsForServerPage,"createTemporaryReferenceSet",()=>s.createTemporaryReferenceSet,"decodeAction",()=>s.decodeAction,"decodeFormState",()=>s.decodeFormState,"decodeReply",()=>s.decodeReply,"handler",0,r,"isEmptyHTMLPrelude",()=>s.isEmptyHTMLPrelude,"patchFetch",()=>s.patchFetch,"preconnect",()=>s.preconnect,"preloadFont",()=>s.preloadFont,"preloadStyle",()=>s.preloadStyle,"prerender",()=>s.prerender,"prerenderToNodeStream",()=>s.prerenderToNodeStream,"renderToPipeableStream",()=>s.renderToPipeableStream,"renderToReadableStream",()=>s.renderToReadableStream,"routeModule",0,q,"serverHooks",()=>s.serverHooks,"taintObjectReference",()=>s.taintObjectReference],41619)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0l4t71c._.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports=[11510,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(56561),e=a.i(3130),f=a.i(40695),g=a.i(5522);let h=(a,b,c)=>` ${a}: '${b}',${c?` // ${c}`:""}`,i=`// Records a MetricFlowEvent in New Relic. Does nothing before init, and nothing for Sentry.
|
|
2
2
|
import { send } from '@karan171996/metricflow/browser';
|
|
3
3
|
|
|
4
|
-
send('checkout_step', 2, { step: 'payment' });`,j="border-[#2d3748] bg-[#1a202c] shadow-md";function k({n:a,title:d,help:g,code:h}){let[i,l]=(0,c.useState)(null);return(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:d}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:g})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[(0,b.jsx)("pre",{tabIndex:0,"aria-label":`Code snippet ${a}`,className:"overflow-x-auto rounded-md border border-[#2d3748] bg-[#0f1419] p-3 text-xs text-gray-300",children:h}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(f.Button,{variant:"outline","aria-label":`Copy snippet ${a}: ${d.replace(/^\d+\. /,"")}`,onClick:()=>{navigator.clipboard.writeText(h).then(()=>l("ok"),()=>l("fail")),setTimeout(()=>l(null),2500)},children:"Copy"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${"fail"===i?"text-[#f87171]":"text-[#3ee0a1]"}`,children:"ok"===i?"Copied":"fail"===i?"Copy failed, select the text and copy manually":""})]})]})]})}function l({label:a,state:c,detail:d}){let e="ok"===c?"text-[#3ee0a1]":"bad"===c?"text-[#f87171]":"text-gray-400";return(0,b.jsxs)("div",{className:"flex items-start gap-3 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:`font-mono text-sm ${e}`,"aria-hidden":!0,children:"ok"===c?"✓":"bad"===c?"✗":"…"}),(0,b.jsx)("span",{className:"sr-only",children:"ok"===c?"working":"bad"===c?"not working":"checking"}),(0,b.jsx)("span",{className:"text-sm text-gray-300 w-56 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 text-sm ${e}`,children:d})]})}function m({label:a,s:c}){let d="Checking…",e="text-gray-400";if(c?.error)d=c.error,e="text-[#f87171]";else if(c){let a=null!==c.recent&&c.recent>0;d=a?`Receiving data${c.lastEventAt?` \xb7 last event ${new Date(c.lastEventAt).toLocaleTimeString()}`:""}`:c.lastEventAt?`None in the last 5 minutes \xb7 last event ${new Date(c.lastEventAt).toLocaleString()}`:"None yet",e=a?"text-[#3ee0a1]":"text-[#f59e0b]"}return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:"text-sm text-gray-300 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 break-words text-right text-sm ${e}`,children:d})]})}a.s(["ConnectPage",0,function(){let[a,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(!1),w=(0,c.useCallback)(()=>{fetch("/api/connect").then(a=>a.json()).then(n).catch(()=>{})},[]);async function x(){t(!0),r(null);try{let a=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({NEWRELIC_INSERT_KEY:o})}),b=await a.json();b.saved?(p(""),v(!1),r({ok:!0,text:"Insert key saved."}),w()):r({ok:!1,text:b.error??b.results?.NEWRELIC_INSERT_KEY?.error??"Could not save the key."})}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}async function y(){t(!0),r(null);try{let a=await fetch("/api/connect",{method:"POST",headers:{"Content-Type":"application/json"}}),b=await a.json();r(b.sent?{ok:!0,text:"Test event sent. It can take up to a minute to show below."}:{ok:!1,text:b.error??"Failed."}),w()}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}if((0,c.useEffect)(()=>{w();let a=setInterval(()=>{document.hidden||w()},5e3);return()=>clearInterval(a)},[w]),a?.error)return(0,b.jsx)(e.Card,{className:j,children:(0,b.jsx)(e.CardContent,{className:"p-10 text-center","aria-live":"polite",children:(0,b.jsx)("p",{className:"text-sm text-[#f87171]",children:a.error})})});if(a&&!a.configured)return(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Set up your keys first"}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:"Add your New Relic or Sentry keys, then come back to connect your site."}),(0,b.jsx)(d.default,{href:"/setup",className:(0,f.buttonVariants)(),children:"Go to setup"})]})});let z=!a?.tools||a.tools.includes("new-relic"),A=!a?.tools||a.tools.includes("sentry"),B=(z?2:1)+1,C=!!(a?.tools?.includes("sentry")&&!a.dsn);return(0,b.jsxs)("div",{className:"flex flex-col gap-6 max-w-3xl",children:[z&&(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Connection"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:"Each link in the chain from your site to this dashboard. Fix the first \\u2717."})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[(0,b.jsx)(l,{label:"Keys for reading",state:a?"ok":"wait",detail:a?.accountId?`Reading New Relic account ${a.accountId}`:"Checking…"}),(0,b.jsx)(l,{label:"Browser app in New Relic",state:a?.setup?a.setup.error?"bad":a.setup.appCount>0?"ok":"bad":"wait",detail:a?.setup?a.setup.error?a.setup.error:a.setup.appCount>0?`${a.setup.appName} \u00b7 application ID ${a.setup.applicationId}`:"None yet. Create one: New Relic > Add data > Browser monitoring. Until then your site has no application ID to send to.":"Checking…"}),(0,b.jsx)(l,{label:"Browser key",state:a?.setup?a.setup.browserKey?"ok":"bad":"wait",detail:a?.setup?a.setup.browserKey?`${a.setup.browserKey} \u00b7 already filled into snippet 1 below`:"Could not read it. Copy the key VALUE from New Relic > API keys (type Ingest - Browser), not the ID beside it.":"Checking…"}),(0,b.jsx)(l,{label:"Your site sending data",state:a?.browser?(a.browser.recent??0)>0?"ok":"bad":"wait",detail:a?.browser?(a.browser.recent??0)>0?"New Relic is receiving page views":"No page views yet. Load your site, then check for blocked requests to nr-data.net - ad and privacy blockers drop them silently.":"Checking…"})]})]}),(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Events received (last 5 minutes)"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[a?.accountId?(0,b.jsxs)(b.Fragment,{children:["Querying New Relic account ",(0,b.jsx)("span",{className:"font-mono text-gray-200",children:a.accountId}),". "]}):null,"Updates every few seconds. All rows empty? Check this is the account your site sends to."]})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[z&&(0,b.jsx)(m,{label:"Browser agent (page views)",s:a?.browser}),z&&(0,b.jsx)(m,{label:"Custom events (send / test event)",s:a?.custom}),A&&(0,b.jsx)(m,{label:"Sentry errors",s:a?.sentry})]})]}),z&&(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Two different New Relic keys"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[(0,b.jsx)("strong",{className:"text-gray-200",children:"User API key"})," (set on Setup): lets this dashboard ",(0,b.jsx)("em",{children:"read"})," your data."," ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - License key"})," (below): lets a script ",(0,b.jsx)("em",{children:"send"})," events. Only the Insert key is used by the test button. The Browser agent snippet uses a third key, the ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - Browser"})," key. Dashboards for US New Relic accounts only."]})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[a?.insertKeySet&&!u?(0,b.jsxs)("p",{className:"text-sm text-[#3ee0a1]",children:["✓ Insert key is set"," ",(0,b.jsx)("button",{type:"button",className:"ml-2 text-gray-300 underline",onClick:()=>v(!0),children:"Replace"})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"insert-key",className:"text-sm font-medium text-gray-300",children:"Insert key · sends test events"}),(0,b.jsx)("p",{id:"insert-key-help",className:"text-xs text-gray-400",children:'Only needed for the test button and custom events. Different from the User key. Create it as type "Ingest - License".'}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{id:"insert-key","aria-describedby":"insert-key-help",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"Ingest - License key",value:o,onChange:a=>p(a.target.value),className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)(f.Button,{onClick:x,disabled:s||!o.trim(),children:"Save"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{onClick:y,disabled:s||!a?.insertKeySet,children:"Send test event"}),!a?.insertKeySet&&(0,b.jsx)("span",{className:"text-sm text-gray-400",children:"Add an Insert key first"}),q&&(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${q.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:q.text})]})]})]}),z&&(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Snippet 1 runs in the browser, so its key is public."})," Use the ",(0,b.jsx)("strong",{children:"Ingest - Browser"})," key (starts ",(0,b.jsx)("span",{className:"font-mono",children:"NRJS-"}),"), never your ",(0,b.jsx)("span",{className:"font-mono",children:"NRAK-"})," User key from Setup - that one would hand every visitor full read/write access to your account. The application ID is also not your account ID."]})}),C&&(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Your saved Sentry DSN cannot go in a public page."})," It must start with ",(0,b.jsx)("span",{className:"font-mono",children:"https://"})," and contain no secret part. ",(0,b.jsx)(d.default,{href:"/setup#sentry",className:"underline",children:"Replace it on Setup"}),", then the snippet below fills it in."]})}),(0,b.jsx)(k,{n:1,title:"1. Add MetricFlow to your site",help:"One install and one call. It sends page views, load timing, Core Web Vitals and JavaScript errors to the tools you connected. You do not install a New Relic or Sentry package yourself.",code:function({tools:a,accountId:b,applicationId:c,browserKey:d,region:e,dsn:f}={}){let g=[];return(!a||a.includes("new-relic"))&&g.push([" 'new-relic': {",h("browserKey",d??"NRJS-xxxxxxxxxxxxxxxxxxx",d?void 0:"replace: New Relic > API keys > Ingest - Browser. Starts NRJS-, NOT your NRAK- User key"),h("applicationId",c??"123456789",c?void 0:"replace: New Relic > Add data > Browser monitoring. NOT your account ID"),h("accountId",b??"1234567",b?void 0:"replace: your New Relic account ID"),..."eu"===e?[h("region","eu")]:[]," },"].join("\n")),(!a||a.includes("sentry"))&&g.push([" sentry: {",h("dsn",f??"https://00000000000000000000000000000000@o0.ingest.sentry.io/0",f?void 0:"replace: Sentry > Project settings > Client Keys (DSN)")," },"].join("\n")),`// npm i @karan171996/metricflow
|
|
4
|
+
send('checkout_step', 2, { step: 'payment' });`,j="border-[#2d3748] bg-[#1a202c] shadow-md";function k({n:a,title:d,help:g,code:h}){let[i,l]=(0,c.useState)(null);return(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:d}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:g})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[(0,b.jsx)("pre",{tabIndex:0,"aria-label":`Code snippet ${a}`,className:"overflow-x-auto rounded-md border border-[#2d3748] bg-[#0f1419] p-3 text-xs text-gray-300",children:h}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(f.Button,{variant:"outline","aria-label":`Copy snippet ${a}: ${d.replace(/^\d+\. /,"")}`,onClick:()=>{navigator.clipboard.writeText(h).then(()=>l("ok"),()=>l("fail")),setTimeout(()=>l(null),2500)},children:"Copy"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${"fail"===i?"text-[#f87171]":"text-[#3ee0a1]"}`,children:"ok"===i?"Copied":"fail"===i?"Copy failed, select the text and copy manually":""})]})]})]})}function l({label:a,state:c,detail:d}){let e="ok"===c?"text-[#3ee0a1]":"bad"===c?"text-[#f87171]":"text-gray-400";return(0,b.jsxs)("div",{className:"flex items-start gap-3 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:`font-mono text-sm ${e}`,"aria-hidden":!0,children:"ok"===c?"✓":"bad"===c?"✗":"…"}),(0,b.jsx)("span",{className:"sr-only",children:"ok"===c?"working":"bad"===c?"not working":"checking"}),(0,b.jsx)("span",{className:"text-sm text-gray-300 w-56 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 text-sm ${e}`,children:d})]})}function m({label:a,s:c}){let d="Checking…",e="text-gray-400";if(c?.error)d=c.error,e="text-[#f87171]";else if(c){let a=null!==c.recent&&c.recent>0;d=a?`Receiving data${c.lastEventAt?` \xb7 last event ${new Date(c.lastEventAt).toLocaleTimeString()}`:""}`:c.lastEventAt?`None in the last 5 minutes \xb7 last event ${new Date(c.lastEventAt).toLocaleString()}`:"None yet",e=a?"text-[#3ee0a1]":"text-[#f59e0b]"}return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b border-[#2d3748] py-2 last:border-0",children:[(0,b.jsx)("span",{className:"text-sm text-gray-300 shrink-0",children:a}),(0,b.jsx)("span",{className:`min-w-0 break-words text-right text-sm ${e}`,children:d})]})}a.s(["ConnectPage",0,function(){let[a,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(""),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(!1),w=(0,c.useCallback)(()=>{fetch("/api/connect").then(a=>a.json()).then(n).catch(()=>{})},[]);async function x(){t(!0),r(null);try{let a=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({NEWRELIC_INSERT_KEY:o})}),b=await a.json();b.saved?(p(""),v(!1),r({ok:!0,text:"Insert key saved."}),w()):r({ok:!1,text:b.error??b.results?.NEWRELIC_INSERT_KEY?.error??"Could not save the key."})}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}async function y(){t(!0),r(null);try{let a=await fetch("/api/connect",{method:"POST",headers:{"Content-Type":"application/json"}}),b=await a.json();r(b.sent?{ok:!0,text:"Test event sent. It can take up to a minute to show below."}:{ok:!1,text:b.error??"Failed."}),w()}catch{r({ok:!1,text:"Could not reach the dashboard server."})}finally{t(!1)}}if((0,c.useEffect)(()=>{w();let a=setInterval(()=>{document.hidden||w()},5e3);return()=>clearInterval(a)},[w]),a?.error)return(0,b.jsx)(e.Card,{className:j,children:(0,b.jsx)(e.CardContent,{className:"p-10 text-center","aria-live":"polite",children:(0,b.jsx)("p",{className:"text-sm text-[#f87171]",children:a.error})})});if(a&&!a.configured)return(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"flex flex-col items-center gap-3 p-10 text-center",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Set up your keys first"}),(0,b.jsx)("p",{className:"max-w-md text-sm text-gray-400",children:"Add your New Relic or Sentry keys, then come back to connect your site."}),(0,b.jsx)(d.default,{href:"/setup",className:(0,f.buttonVariants)(),children:"Go to setup"})]})});let z=!a?.tools||a.tools.includes("new-relic"),A=!a?.tools||a.tools.includes("sentry"),B=(z?2:1)+1,C=!!(a?.tools?.includes("sentry")&&!a.dsn);return(0,b.jsxs)("div",{className:"flex flex-col gap-6 max-w-3xl",children:[z&&(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Connection"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:"Each link in the chain from your site to this dashboard. Fix the first ✗."})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[(0,b.jsx)(l,{label:"Keys for reading",state:a?"ok":"wait",detail:a?.accountId?`Reading New Relic account ${a.accountId}`:"Checking…"}),(0,b.jsx)(l,{label:"Browser app in New Relic",state:a?.setup?a.setup.error?"bad":a.setup.appCount>0?"ok":"bad":"wait",detail:a?.setup?a.setup.error?a.setup.error:a.setup.appCount>0?`${a.setup.appName} \u00b7 application ID ${a.setup.applicationId}`:"None yet. Create one: New Relic > Add data > Browser monitoring. Until then your site has no application ID to send to.":"Checking…"}),(0,b.jsx)(l,{label:"Browser key",state:a?.setup?a.setup.browserKey?"ok":"bad":"wait",detail:a?.setup?a.setup.browserKey?`${a.setup.browserKey} \u00b7 already filled into snippet 1 below`:"Could not read it. Copy the key VALUE from New Relic > API keys (type Ingest - Browser), not the ID beside it.":"Checking…"}),(0,b.jsx)(l,{label:"Your site sending data",state:a?.browser?(a.browser.recent??0)>0?"ok":"bad":"wait",detail:a?.browser?(a.browser.recent??0)>0?"New Relic is receiving page views":"No page views yet. Load your site, then check for blocked requests to nr-data.net - ad and privacy blockers drop them silently.":"Checking…"})]})]}),(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Events received (last 5 minutes)"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[a?.accountId?(0,b.jsxs)(b.Fragment,{children:["Querying New Relic account ",(0,b.jsx)("span",{className:"font-mono text-gray-200",children:a.accountId}),". "]}):null,"Updates every few seconds. All rows empty? Check this is the account your site sends to."]})]}),(0,b.jsxs)(e.CardContent,{"aria-live":"polite",children:[z&&(0,b.jsx)(m,{label:"Browser agent (page views)",s:a?.browser}),z&&(0,b.jsx)(m,{label:"Custom events (send / test event)",s:a?.custom}),A&&(0,b.jsx)(m,{label:"Sentry errors",s:a?.sentry})]})]}),z&&(0,b.jsxs)(e.Card,{className:j,children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-base font-bold text-white",children:"Two different New Relic keys"}),(0,b.jsxs)(e.CardDescription,{className:"text-sm text-gray-400",children:[(0,b.jsx)("strong",{className:"text-gray-200",children:"User API key"})," (set on Setup): lets this dashboard ",(0,b.jsx)("em",{children:"read"})," your data."," ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - License key"})," (below): lets a script ",(0,b.jsx)("em",{children:"send"})," events. Only the Insert key is used by the test button. The Browser agent snippet uses a third key, the ",(0,b.jsx)("strong",{className:"text-gray-200",children:"Ingest - Browser"})," key. Dashboards for US New Relic accounts only."]})]}),(0,b.jsxs)(e.CardContent,{className:"flex flex-col gap-3",children:[a?.insertKeySet&&!u?(0,b.jsxs)("p",{className:"text-sm text-[#3ee0a1]",children:["✓ Insert key is set"," ",(0,b.jsx)("button",{type:"button",className:"ml-2 text-gray-300 underline",onClick:()=>v(!0),children:"Replace"})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"insert-key",className:"text-sm font-medium text-gray-300",children:"Insert key · sends test events"}),(0,b.jsx)("p",{id:"insert-key-help",className:"text-xs text-gray-400",children:'Only needed for the test button and custom events. Different from the User key. Create it as type "Ingest - License".'}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(g.Input,{id:"insert-key","aria-describedby":"insert-key-help",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"Ingest - License key",value:o,onChange:a=>p(a.target.value),className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)(f.Button,{onClick:x,disabled:s||!o.trim(),children:"Save"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{onClick:y,disabled:s||!a?.insertKeySet,children:"Send test event"}),!a?.insertKeySet&&(0,b.jsx)("span",{className:"text-sm text-gray-400",children:"Add an Insert key first"}),q&&(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${q.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:q.text})]})]})]}),z&&(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Snippet 1 runs in the browser, so its key is public."})," Use the ",(0,b.jsx)("strong",{children:"Ingest - Browser"})," key (starts ",(0,b.jsx)("span",{className:"font-mono",children:"NRJS-"}),"), never your ",(0,b.jsx)("span",{className:"font-mono",children:"NRAK-"})," User key from Setup - that one would hand every visitor full read/write access to your account. The application ID is also not your account ID."]})}),C&&(0,b.jsx)(e.Card,{className:j,children:(0,b.jsxs)(e.CardContent,{className:"p-4 text-sm text-[#f87171] border-l-2 border-[#f87171]",children:[(0,b.jsx)("strong",{children:"Your saved Sentry DSN cannot go in a public page."})," It must start with ",(0,b.jsx)("span",{className:"font-mono",children:"https://"})," and contain no secret part. ",(0,b.jsx)(d.default,{href:"/setup#sentry",className:"underline",children:"Replace it on Setup"}),", then the snippet below fills it in."]})}),(0,b.jsx)(k,{n:1,title:"1. Add MetricFlow to your site",help:"One install and one call. It sends page views, load timing, Core Web Vitals and JavaScript errors to the tools you connected. You do not install a New Relic or Sentry package yourself.",code:function({tools:a,accountId:b,applicationId:c,browserKey:d,region:e,dsn:f}={}){let g=[];return(!a||a.includes("new-relic"))&&g.push([" 'new-relic': {",h("browserKey",d??"NRJS-xxxxxxxxxxxxxxxxxxx",d?void 0:"replace: New Relic > API keys > Ingest - Browser. Starts NRJS-, NOT your NRAK- User key"),h("applicationId",c??"123456789",c?void 0:"replace: New Relic > Add data > Browser monitoring. NOT your account ID"),h("accountId",b??"1234567",b?void 0:"replace: your New Relic account ID"),..."eu"===e?[h("region","eu")]:[]," },"].join("\n")),(!a||a.includes("sentry"))&&g.push([" sentry: {",h("dsn",f??"https://00000000000000000000000000000000@o0.ingest.sentry.io/0",f?void 0:"replace: Sentry > Project settings > Client Keys (DSN)")," },"].join("\n")),`// npm i @karan171996/metricflow
|
|
5
5
|
// Call init once, when your site starts. In Next.js put this in instrumentation-client.ts.
|
|
6
6
|
// If your site already runs its own Sentry, call init after it.
|
|
7
7
|
import { init } from '@karan171996/metricflow/browser';
|