diff --git a/docs/organization/integrations/cloud-monitoring/aws-lambda/index.mdx b/docs/organization/integrations/cloud-monitoring/aws-lambda/index.mdx
index c2aaa4e90c22ab..a6bb9ad18f43bb 100644
--- a/docs/organization/integrations/cloud-monitoring/aws-lambda/index.mdx
+++ b/docs/organization/integrations/cloud-monitoring/aws-lambda/index.mdx
@@ -165,7 +165,7 @@ Currently, there's no way of using the [latest layer plugin](https://www.npmjs.c
If you use Node functions in [SST](https://serverless-stack.com) and you want to use this integration, you'll need to:
-1. Import the [Lambda layer](/platforms/javascript/guides/aws-lambda/layer/) using the [`LayerVersion`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.LayerVersion.html) construct and set it by calling [`addDefaultFunctionLayers`](https://docs.serverless-stack.com/constructs/Stack#adddefaultfunctionlayers).
+1. Import the [Lambda layer](/platforms/javascript/guides/aws-lambda/install/layer/) using the [`LayerVersion`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.LayerVersion.html) construct and set it by calling [`addDefaultFunctionLayers`](https://docs.serverless-stack.com/constructs/Stack#adddefaultfunctionlayers).
2. Then set the `NODE_OPTIONS`, `SENTRY_DSN`, and `SENTRY_TRACES_SAMPLE_RATE` environment variables with the [`addDefaultFunctionEnv`](https://docs.serverless-stack.com/constructs/Stack#adddefaultfunctionenv) method.
Read [how this integration works](/organization/integrations/cloud-monitoring/aws-lambda/how-it-works/) and [the SST docs](https://docs.serverless-stack.com/monitoring-your-app-in-prod#sentry) for more information.
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x.mdx
index 1418e777f7d9d2..45816932d6b28e 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x.mdx
@@ -11,7 +11,7 @@ In this guide you will learn how to set up the `@sentry/aws-serverless` SDK for
We recommend starting the SDK automatically via environment variables so that you only have to make minimal code changes to your lambda function.
If you need more control over the SDK setup, you can also [initialize the SDK in in code](#alternative-initialize-the-sdk-in-code).
-However, you need to modify your code and deploy the Sentry dependencies alongside your function code. If you're looking for the most simple way to set up Sentry, you might want to use the [Lambda Layer](./layer__v9.x.mdx) instead.
+However, you need to modify your code and deploy the Sentry dependencies alongside your function code. If you're looking for the most simple way to set up Sentry, you might want to use the [Lambda Layer](/platforms/javascript/guides/aws-lambda/install/layer__v9.x) instead.
## 1. Prerequisites
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/index__v9.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/index__v9.x.mdx
index 27303bf92530b3..55ed8e3a708f71 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/index__v9.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/index__v9.x.mdx
@@ -18,11 +18,11 @@ Note that TypeScript can also be configured to output ESM, in which case you sho
### My Lambda function uses `require`
-If you are using `require()` in your function, follow the CommonJS instructions. Choose between [using our Lambda Layer (recommended)](./install/layer__v9.x.mdx) or [installing the Sentry AWS NPM package](./install/npm__v9.x.mdx).
+If you are using `require()` in your function, follow the CommonJS instructions. Choose between [using our Lambda Layer (recommended)](/platforms/javascript/guides/aws-lambda/install/layer__v9.x) or [installing the Sentry AWS NPM package](/platforms/javascript/guides/aws-lambda/install/npm__v9.x).
### My Lambda function uses `import`
-If you're using `import` syntax in your function and you're _not_ transpiling the code to CommonJS, follow the [ESM instructions](./install/esm-npm__v9.x.mdx).
+If you're using `import` syntax in your function and you're _not_ transpiling the code to CommonJS, follow the [ESM instructions](/platforms/javascript/guides/aws-lambda/install/esm-npm__v9.x).
### Can I use the Lambda layer for ESM functions?
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/layer__v8.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/layer__v8.x.mdx
index ab5246299ff560..61e109a9aa73ef 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/layer__v8.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/layer__v8.x.mdx
@@ -8,13 +8,13 @@ noindex: true
og_image: /og-images/platforms-javascript-guides-aws-lambda-install-layer__v8.x.png
---
-The easiest way to get started with Sentry is to use the Sentry [Lambda Layer](https://docs.aws.amazon.com/Lambda/latest/dg/configuration-layers.html) instead of adding `@sentry/aws-serverless` with `npm` or `yarn` [manually](../install/npm.mdx).
+The easiest way to get started with Sentry is to use the Sentry [Lambda Layer](https://docs.aws.amazon.com/Lambda/latest/dg/configuration-layers.html) instead of adding `@sentry/aws-serverless` with `npm` or `yarn` [manually](/platforms/javascript/guides/aws-lambda/install/npm).
If you follow this guide, you don't have to worry about deploying Sentry dependencies alongside your function code.
To actually start the SDK, you can decide between setting up the SDK using environment variables or in your Lambda function code. We recommend using environment variables as it's the easiest way to get started. [Initializing the SDK in code](#alternative-initialize-the-sdk-in-code) instead of setting environment variables gives you more control over the SDK setup if you need it.
-This installation method **does not** work with Lambda functions running in EcmaScript Modules (ESM) mode, using `import` syntax. If you're running your function in ESM, follow the [ESM guide](../install/npm.mdx).
+This installation method **does not** work with Lambda functions running in EcmaScript Modules (ESM) mode, using `import` syntax. If you're running your function in ESM, follow the [ESM guide](/platforms/javascript/guides/aws-lambda/install/npm).
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/layer__v9.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/layer__v9.x.mdx
index 56b72c91a802c0..df7119716f17bc 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/layer__v9.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/layer__v9.x.mdx
@@ -7,13 +7,13 @@ sidebar_order: 1
og_image: /og-images/platforms-javascript-guides-aws-lambda-install-layer__v9.x.png
---
-The easiest way to get started with Sentry is to use the Sentry [Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/adding-layers.html) instead of adding `@sentry/aws-serverless` with `npm` or `yarn` [manually](./npm__v9.x.mdx).
+The easiest way to get started with Sentry is to use the Sentry [Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/adding-layers.html) instead of adding `@sentry/aws-serverless` with `npm` or `yarn` [manually](/platforms/javascript/guides/aws-lambda/install/npm__v9.x).
If you follow this guide, you don't have to worry about deploying Sentry dependencies alongside your function code.
To actually start the SDK, you can decide between setting up the SDK using environment variables or in your Lambda function code. We recommend using environment variables as it's the easiest way to get started. [Initializing the SDK in code](#alternative-initialize-the-sdk-in-code) instead of setting environment variables gives you more control over the SDK setup if you need it.
-This installation method **does not** work with Lambda functions running in EcmaScript Modules (ESM) mode, using `import` syntax. If you're running your function in ESM, follow the [ESM guide](../npm__v9.x.mdx).
+This installation method **does not** work with Lambda functions running in EcmaScript Modules (ESM) mode, using `import` syntax. If you're running your function in ESM, follow the [ESM guide](/platforms/javascript/guides/aws-lambda/install/esm-npm__v9.x).
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
index 6e4faeca5a935d..9f8e538eeb844f 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
@@ -11,7 +11,7 @@ In this guide you will learn how to set up the `@sentry/aws-serverless` SDK for
We recommend starting the SDK automatically via environment variables so that you only have to make minimal code changes to your lambda function.
If you need more control over the SDK setup, you can also [initialize the SDK in code](#option-b-manual-setup).
-However, you need to modify your code and deploy the Sentry dependencies alongside your function code. If you're looking for the most simple way to set up Sentry, use the [Lambda Layer](../layer) instead.
+However, you need to modify your code and deploy the Sentry dependencies alongside your function code. If you're looking for the most simple way to set up Sentry, use the [Lambda Layer](/platforms/javascript/guides/aws-lambda/install/layer) instead.
## 1. Prerequisites
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/npm__v9.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/npm__v9.x.mdx
index ecbc8c578957cd..5dda8bf772fd95 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/npm__v9.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/npm__v9.x.mdx
@@ -8,13 +8,13 @@ Based on whether your Lambda function runs in CommonJS or ESM, you need to follo
## My Lambda function is written in TypeScript
-If you're using TypeScript, your lambda function is likely transpiled to CommonJS before running it. In this case, follow the [CommonJS instructions](./cjs-npm__v9.x.mdx).
-Note that TypeScript can also be configured to output ESM, in which case you should follow the [ESM instructions](./esm-npm__v9.x.mdx).
+If you're using TypeScript, your lambda function is likely transpiled to CommonJS before running it. In this case, follow the [CommonJS instructions](/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x).
+Note that TypeScript can also be configured to output ESM, in which case you should follow the [ESM instructions](/platforms/javascript/guides/aws-lambda/install/esm-npm__v9.x).
## My Lambda function uses `require`
-If you are using `require()` in your function, follow the [CommonJS instructions](./cjs-npm__v9.x.mdx).
+If you are using `require()` in your function, follow the [CommonJS instructions](/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x).
## My Lambda function uses `import`
-If you're using `import` syntax in your function and you're _not_ transpiling the code to CommonJS, follow the [ESM instructions](./esm-npm__v9.x.mdx).
+If you're using `import` syntax in your function and you're _not_ transpiling the code to CommonJS, follow the [ESM instructions](/platforms/javascript/guides/aws-lambda/install/esm-npm__v9.x).
diff --git a/docs/platforms/react-native/integrations/plugin.mdx b/docs/platforms/react-native/integrations/plugin.mdx
index 2336c1e0292121..8042d40e0649fa 100644
--- a/docs/platforms/react-native/integrations/plugin.mdx
+++ b/docs/platforms/react-native/integrations/plugin.mdx
@@ -126,4 +126,4 @@ Sentry.init({
});
```
-For more information, please refer to [the Supabase integration documentation for the JavaScript SDK](javascript/guides/node/configuration/integrations/supabase/).
+For more information, please refer to [the Supabase integration documentation for the JavaScript SDK](/platforms/javascript/guides/node/configuration/integrations/supabase/).
diff --git a/redirects.js b/redirects.js
index d29d422c3601d0..1b551ce15b7467 100644
--- a/redirects.js
+++ b/redirects.js
@@ -271,6 +271,22 @@ const userDocsRedirects = [
source: '/organization/integrations/launchdarkly/',
destination: '/organization/integrations/feature-flag/launchdarkly/',
},
+ {
+ source: '/platforms/javascript/guides/aws-lambda/layer__v9.x/',
+ destination: '/platforms/javascript/guides/aws-lambda/install/layer__v9.x/',
+ },
+ {
+ source: '/platforms/javascript/guides/aws-lambda/npm__v9.x/',
+ destination: '/platforms/javascript/guides/aws-lambda/install/npm__v9.x/',
+ },
+ {
+ source: '/platforms/javascript/guides/aws-lambda/esm-npm__v9.x/',
+ destination: '/platforms/javascript/guides/aws-lambda/install/esm-npm__v9.x/',
+ },
+ {
+ source: '/platforms/javascript/guides/aws-lambda/cjs-npm__v9.x/',
+ destination: '/platforms/javascript/guides/aws-lambda/install/cjs-npm__v9.x/',
+ },
{
source: '/platforms/javascript/guides/nextjs/sourcemaps/uploading/',
destination: '/platforms/javascript/guides/nextjs/sourcemaps/',
diff --git a/scripts/lint-404s/main.ts b/scripts/lint-404s/main.ts
index 8470a8526055c6..706d42ff2f238e 100644
--- a/scripts/lint-404s/main.ts
+++ b/scripts/lint-404s/main.ts
@@ -14,6 +14,13 @@ const ignoreListFile = path.join(dirname(import.meta.url), './ignore-list.txt');
const showProgress = process.argv.includes('--progress');
+// Get the path filter if specified
+const pathFilterIndex = process.argv.indexOf('--path');
+const pathFilter =
+ pathFilterIndex !== -1 && process.argv[pathFilterIndex + 1]
+ ? trimSlashes(process.argv[pathFilterIndex + 1])
+ : null;
+
// Paths to skip
const ignoreList: string[] = readFileSync(fileURLToPath(ignoreListFile), 'utf8')
.split('\n')
@@ -34,10 +41,15 @@ async function main() {
const slugs = [...sitemap.matchAll(/([^<]*)<\/loc>/g)]
.map(l => l[1])
.map(url => trimSlashes(new URL(url).pathname))
- .filter(Boolean);
+ .filter(Boolean)
+ .filter(slug => (pathFilter ? slug.startsWith(pathFilter) : true));
const allSlugsSet = new Set(slugs);
- console.log('Checking 404s on %d pages', slugs.length);
+ if (pathFilter) {
+ console.log('Checking 404s on %d pages in /%s', slugs.length, pathFilter);
+ } else {
+ console.log('Checking 404s on %d pages', slugs.length);
+ }
const all404s: {page404s: Link[]; slug: string}[] = [];