Description
openedon Nov 25, 2024
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.118.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
Code available here: https://www.notion.so/sentry/Dynamically-loading-sample-rates-based-on-MicroFE-1428b10e4b5d80ec85f3e470eb8ae9b9
Steps to Reproduce
Following the documentation here: Manually Route Errors to Different Projects,
We are calling thegetEvent()
function within dsnFromFeature
. This function parses the event's URL using a regex and returns a JSON object from a file containing the corresponding DSN key.
In addition to returning the DSN key, we would also like to include sample rates (for errors, transactions, and replays) associated with each DSN. This will allow us to dynamically initialize the Sentry SDK with those values.
Expected Result
Each micro-frontend (microFE) is dynamically adjusted based on the configuration specified in the JSON file, including the DSN key and sample rates for errors, transactions, and replays.
Actual Result
getEvent() is undefined
Metadata
Assignees
Type
Projects
Status
No status
Activity