Skip to content
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

Dynamically loading sample rates based on MicroFE #14469

Open
3 tasks done
dachakra opened this issue Nov 25, 2024 · 1 comment
Open
3 tasks done

Dynamically loading sample rates based on MicroFE #14469

dachakra opened this issue Nov 25, 2024 · 1 comment
Labels
Package: browser Issues related to the Sentry Browser SDK

Comments

@dachakra
Copy link

Is there an existing issue for this?

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

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 25, 2024
@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label Nov 25, 2024
@chargome
Copy link
Member

@dachakra left some comments in the linked document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK
Projects
Status: No status
Development

No branches or pull requests

2 participants