Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
shanamatthews
left a comment
There was a problem hiding this comment.
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.
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.
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 <shana.l.matthews@gmail.com>
|
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.