-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
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
8.27.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- Configure a direct client:
const integrations = getDefaultIntegrations({}).filter(defaultIntegration => {
return !['BrowserApiErrors', 'Breadcrumbs', 'GlobalHandlers'].includes(
defaultIntegration.name
);
});
const client = new BrowserClient({
dsn: '...',
transport: makeFetchTransport,
stackParser: defaultStackParser,
integrations: [integrations],
});
const scope = new Scope();
scope.setClient(client);
client.init(); // initializing has to be done after setting the client on the scope
scope.captureException(new Error('client init'));
- Initialise the SDK normally in another project:
Sentry.init({
dsn:"...",
});
Sentry.captureException(new Error("normal init"))
- Send a test event on each case
Expected Result
Both events have the user-agent associated with it allowing the Sentry server to identify the browser and OS.
Actual Result
Only the event from the normal init contains the user-agent. I can see in the manual client that the HttpContext integration responsible for adding the user agent is enabled in the client.
Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Community