Skip to content

docs(js): Add Meta-framework settings for filter integration #12940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 1 addition & 52 deletions docs/platforms/javascript/common/configuration/filtering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,58 +103,7 @@ This allows you to filter out errors with "unmarked" stack frames, which would i
To set up this integration and to mark your JavaScript files with an application key, first pass an `applicationKey` option to your Sentry bundler plugin.
This can be an arbitrary string that identifies your application code:

```ts {tabTitle:Vite} {8}
// vite.config.ts
import { defineConfig } from "vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";

export default defineConfig({
plugins: [
sentryVitePlugin({
applicationKey: "your-custom-application-key",
}),
],
});
```

```js {tabTitle:Webpack} {7}
// webpack.config.js
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

module.exports = {
plugins: [
sentryWebpackPlugin({
applicationKey: "your-custom-application-key",
}),
],
};
```

```js {tabTitle:esbuild} {7}
// esbuild.config.js
const { sentryEsbuildPlugin } = require("@sentry/esbuild-plugin");

require("esbuild").build({
plugins: [
sentryEsbuildPlugin({
applicationKey: "your-custom-application-key",
}),
],
});
```

```js {tabTitle:Rollup} {7}
// rollup.config.mjs
import { sentryRollupPlugin } from "@sentry/rollup-plugin";

export default {
plugins: [
sentryRollupPlugin({
applicationKey: "your-custom-application-key",
}),
],
};
```
<PlatformContent includePath="configuration/filter-application-key" />

Next, add the `thirdPartyErrorFilterIntegration` to your Sentry initialization:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
```ts {tabTitle:Vite} {8}
// vite.config.ts
import { defineConfig } from "vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";

export default defineConfig({
plugins: [
sentryVitePlugin({
applicationKey: "your-custom-application-key",
}),
],
});
```

```js {tabTitle:Webpack} {7}
// webpack.config.js
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

module.exports = {
plugins: [
sentryWebpackPlugin({
applicationKey: "your-custom-application-key",
}),
],
};
```

```js {tabTitle:esbuild} {7}
// esbuild.config.js
const { sentryEsbuildPlugin } = require("@sentry/esbuild-plugin");

require("esbuild").build({
plugins: [
sentryEsbuildPlugin({
applicationKey: "your-custom-application-key",
}),
],
});
```

```js {tabTitle:Rollup} {7}
// rollup.config.mjs
import { sentryRollupPlugin } from "@sentry/rollup-plugin";

export default {
plugins: [
sentryRollupPlugin({
applicationKey: "your-custom-application-key",
}),
],
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript {tabTitle:CJS} {filename:next.config.js} {3}
module.exports = withSentryConfig(nextConfig, {
unstable_sentryWebpackPluginOptions: {
applicationKey: "your-custom-application-key",
},
});
```

```javascript {tabTitle:ESM} {filename:next.config.mjs} {3}
export default withSentryConfig(nextConfig, {
unstable_sentryWebpackPluginOptions: {
applicationKey: "your-custom-application-key",
},
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```javascript {tabTitle:Nuxt Config} {filename:nuxt.config.ts} {4}
export default defineNuxtConfig({
sentry: {
unstable_sentryBundlerPluginOptions: {
applicationKey: "your-custom-application-key",
},
},
});

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```js {tabTitle:Vite} {filename:vite.config.ts} {3}
const sentryConfig = {
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
};

export default defineConfig((config) => {
return {
plugins: [reactRouter(), sentryReactRouter(sentryConfig, config)],
sentryConfig,
};
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```js {tabTitle:Vite} {filename:app.config.ts} {9}
export default defineConfig(
withSentry(
{
/* Your SolidStart config */
},
{
sourceMapsUploadOptions: {
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
},
},
),
);
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```js {tabTitle:Vite} {filename:vite.config.js} {6}
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
},
})
]
});
```