-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(js): Add micro-frontend docs #6754
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
language tweaks, style tweaks, fenced code block language standardization
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
|
||
init({ | ||
dsn: '__FALLBACK_DSN__', | ||
transport: makeMultiplexedTransport(makeFetchTransport, dsnFromFeature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random question but might be relevant to document: which ones are called first: the "matcher" ("dsnFromFeature") or the init's "beforeSend"?
As an example, if I enhance my event tags at init's beforeSend
(e.g. I add "event.tags.feature = cart"), will the enhanced event tags be available at this matcher (i.e. at dsnFromFeature
when getEvent()
is called)?
Context: before this multiplexed transport feature is available, one workaround to send different event to different Sentry project is via beforeSend
and initialize a BrowserClient there (https://github.com/sentry-demos/sentry-micro-frontend/blob/5996c4b528f58696b729db9d41f4962a83c53c77/methods/simple-remote.js#LL42C28-L42C28) So when implementing this mechanism at my company, my implementation actually adds more tags there than just finding out relevant DSN to send to (e.g. I added the micro app's release info). If I could access the tags added in "beforeSend" when the matcher is called, I could reduce some code duplication. However if that's not possible, it's also ok too for me.
Thanks~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The init's beforeSend
is called before the matcher's dsnFromFeature
. Will call this out in the docs - thanks for updating it!
Co-authored-by: Shana Matthews <[email protected]>
Thanks for the review @shanamatthews! |
Closes getsentry/sentry-javascript#7622
Adds preliminary docs for using the multiplexed transport introduced with getsentry/sentry-javascript#7926 for the micro-frontends use case.
Adds a warning about async context support meaning that we cannot isolate breadcrumbs/spans.