Skip to content

Commit

Permalink
Simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed Aug 4, 2023
1 parent db3c996 commit 0a69e7d
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ those specific projects.
## Identifying responsible modules

The help identify modules, we can inject metadata into them which can
later be used to identify which bundles were responsible for an error.

This can be achieved using `@sentry/webpack-plugin` via the
`_experiments.moduleMetadata` option.
later be used to identify which bundles were responsible for an error. This can
be achieved using `@sentry/webpack-plugin` via the `_experiments.moduleMetadata`
option.

Requires version `2.5.0` or higher of `@sentry/webpack-plugin`.

Expand Down Expand Up @@ -82,14 +81,13 @@ Sentry.captureException(new Error("oh no!"));
## Routing events to different projects
Once you've identified which module or modules are likely to be responsible for
an error, you may want to send these events to different Sentry projects.
This can be achieved using the multiplexed transport which can send events to
different Sentry projects based on the attributes on an event.
an error, you may want to send these events to different Sentry projects. The
multiplexed transport can send events to different Sentry projects based on the
attributes on an event.
Requires SDK version `7.50.0` or higher.
The example below uses the `feature` tag to determine which Sentry project to
The example below uses a `feature` tag to determine which Sentry project to
send the event to. If the event does not have a `feature` tag, we send it to the
fallback DSN defined in `Sentry.init`.
Expand Down Expand Up @@ -210,7 +208,7 @@ const transport = makeMultiplexedTransport(makeFetchTransport, args => {
return [];
});

Sentry.init({
init({
dsn: '__DEFAULT_DSN__',
integrations: [new ModuleMetadata()],
transport,
Expand Down

0 comments on commit 0a69e7d

Please sign in to comment.