Closed artaommahe closed 2 months ago
Sorry, was too quick closing this.
Yeah, there can only be one active current (main) hub.
You could do something like this: https://codesandbox.io/s/sentrybrowser-new-client-in-beforesend-e4s68
You have one Sentry.init
and depending on the event that reaches beforeSend
you can create another client with a different DSN to send it elsewhere.
I dont have access to over apps sentry and their dsn value 😕 they are completely independent and are deployed and instantiated separately. Any plans on supporting these integrations for secondary hubs? Currently they (secondary hubs) are supported but some random stuff dont work properly. Micro-frontend/widgets apps are growing now and looks like it's the regular use-case.
So yeah we already talked about this internally, it's not an easy problem to fix and needs a lot, internal refactoring. We are trying to get this done for v6 of the SDK which potentially ships in Q4 2020.
Still see this issue in
"@sentry/browser": "6.0.3",
"@sentry/tracing": "6.0.3",
So did this fix make it to v6 or not? I am struggling with Sentry for couple of days now and find it really frustrating that documentation says "all good, you can use Hub with Client for modular reporting", but then it does not work at all and I have to dig into issues on github to find out that I have to call makeMain (not even mentioned in documentation). But then it only works for reported issues, not uncaught exceptions.
This ticket is open without milestone or update.
Current ticket has milestone v6 which was not achieved and again no update. And there are many other issues which are hanging high and dry.
I can understand that your architecture was not meant for this use case, but the issues are open for more than a year and it's time to put some commitment and announcement. If you are not gonna fix it, my team will consider moving to another error reporting tool, because Sentry just does not work in non-SPA case.
@oleksandr-yefremov we had to make a v6 release for a new default feature enabling, thus what has been announced as v6, has been renamed to v7. And I can assure you that this issue will be resolved in this version. Thanks for your patience.
Thanks for the update! What is ETA for v7?
Early Q2. There are a lot of improvements that we want to include.
Hi there. Is v7 still expected for early Q2 ? It seems status didn't change since February. It would be really nice to have this fix !
Also having the same issue. Using micro frontends with Sentry is currently very difficult.
Just ran into the same challenge myself. Any updates by chance @kamilogorek? Thanks for all the hard work y'all!
Same issue, Hope it get fixed asap.
Hey @artaommahe, have you tried the following way?
import { BrowserClient, defaultIntegrations, Integrations } from '@sentry/browser';
import type { Integration } from '@sentry/types';
const integrations: Integration[] = [
...defaultIntegrations, // You need to add this line in order to have additional tags
new Integrations.Breadcrumbs({ console: false }),
new Integrations.UserAgent(),
];
const client = new BrowserClient({
/// ...
// defaultIntegrations: false, // You probably don't need this one
integrations,
/// ...
});
And I can assure you that this issue will be resolved in this version. [v7]
Hi @kamilogorek has this been dropped from v7 support? I've upgraded to v7 and am still getting the same issue (no breadcrumbs coming through)
@seahindeniz unfortunately specifying it in Integrations explicitly like your example didn't help either.
Why was this issue closed?
This issue hasn't been touched recently and no longer seems relevant. Hence, we're closing it to maintain a clean and transparent backlog.
Please feel free to leave a comment if you think this issue should be reopened.
Package + Version
@sentry/browser
Version:
Description
Main angular application + angular widgets app and there are no breadcrumbs and useragent info for widgets app errors.
Main app sentry is inited like this
same for the widgets app, but without
makeMain
call and global integrations (GlobalHandlers and CaptureConsole).We have breadcrumbs/useragent info for main app errors, but not for widgets app. After more debugging it looks like useragent is only sent when makeMain was called for secondary app (widgets). But as i understand there should be only one main hub on page, so how should we solve this and have breadcrumbs/useragent for each app on page?