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

[Bug]: can't configure sentry #6288

Open
GiancarlosIO opened this issue Sep 27, 2024 · 2 comments
Open

[Bug]: can't configure sentry #6288

GiancarlosIO opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@GiancarlosIO
Copy link

Version

System:
    OS: macOS 12.5.1
    CPU: (8) arm64 Apple M1
    Memory: 100.83 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Browsers:
    Brave Browser: 127.1.68.134
    Chrome: 129.0.6668.60
    Safari: 15.6.1
  npmPackages:
    @modern-js/app-tools: 2.59.0 => 2.59.0 
    @modern-js/runtime: 2.60.0 => 2.60.0

Details

I'm trying to implement sentry and I can't find a way to override/customize the createBrowserRouter function.

image

https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/

I was reviewing the docs but didn't find something I can use to override that. I found this but looks like this is not the way to do that: https://modernjs.dev/en/apis/app/hooks/src/app.html

Maybe there are a doc or config that I'm missing? 🙏🏼

Reproduce link

Reproduce Steps

@GiancarlosIO GiancarlosIO added the bug Something isn't working label Sep 27, 2024
@zllkjc
Copy link
Member

zllkjc commented Oct 15, 2024

you want override createBrowserRouter ? maybe you can use alias for react-router-dom hh

@GiancarlosIO
Copy link
Author

hi @zllkjc

Yes! basically I want to do this:

const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouter(
  createBrowserRouter,
);


// then use sentryCreateBrowserRouter instead if the createBrowserRouter function
const router = sentryCreateBrowserRouter([
  // here would be the autogenerated routes by modernjs
]);

Is it possible with aliases? 🤔 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants