Skip to content

Tree-shaking browserTracingIntegration in NextJS #14011

Closed
@antongunkin

Description

@antongunkin

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nextjs

SDK Version

8

Framework Version

Next 14.2.10

Link to Sentry event

No response

Reproduction Example/SDK Setup

Hey!

Can't get rid of extra browserTracingIntegration integration.
As I can see it happened here: https://github.com/getsentry/sentry-javascript/releases/tag/8.26.0

It worked (-50kb size-limit) prior this version.
Could you please check?

Thank you!

Image

Steps to Reproduce

sentry.client.config.ts

Sentry.init({
  enableTracing: false,
});

next.config.js

config.plugins.push(
  new webpack.DefinePlugin({
    __SENTRY_TRACING__: false,
  }),
);

const sentryConfig = {
  bundleSizeOptimizations: {
    excludeTracing: true,
  },
};

module.exports = module.exports = withSentryConfig(nextConfig, sentryConfig);

Expected Result

No browserTracingIntegration.js in clients js-bundle.

Actual Result

Extra integration, increased bundle-size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions