diff --git a/docs/platforms/javascript/common/best-practices/micro-frontends.mdx b/docs/platforms/javascript/common/best-practices/micro-frontends.mdx index 6b0d25547c85d4..1ef253f8ed4c0c 100644 --- a/docs/platforms/javascript/common/best-practices/micro-frontends.mdx +++ b/docs/platforms/javascript/common/best-practices/micro-frontends.mdx @@ -225,7 +225,7 @@ you can use the multiplexed transport's API to route events to specific projects The simplest way to manually route events is by using the default matcher with `MULTIPLEXED_TRANSPORT_EXTRA_KEY`: -```js +```javascript {tabTitle:NPM} import { captureException, init, @@ -250,13 +250,44 @@ captureException(new Error("oh no!"), { }); ``` +```html {tabTitle:CDN/Loader Bundle} + + + + + +``` + ### Using a Custom Matcher For more advanced routing logic, you can provide a custom matcher function. The example below uses a `feature` tag to determine which Sentry project to send the event to. If the event doesn't have a `feature` tag, we send it to the fallback DSN defined in `Sentry.init`. -```js +```javascript {tabTitle:NPM} import { captureException, init, @@ -281,6 +312,41 @@ init({ }); ``` +```html {tabTitle:CDN/Loader Bundle} + + + + + +``` + **Replace the placeholder DSN values with your actual Sentry project DSNs:** - Replace `__FALLBACK_DSN__` with the DSN for your fallback/default Sentry project