Skip to content

Frontend Error Monitoring Tutorial error: browserTracingIntegration is not a constructor #11751

@13013SwagR

Description

@13013SwagR

SDK

Android SDK

Description

Following this doc https://docs.sentry.io/product/sentry-basics/integrate-frontend/initialize-sentry-sdk/#2-add-the-sentry-react-sdk
this line new Sentry.browserTracingIntegration(),
throws this error:

Uncaught TypeError: _sentry_react__WEBPACK_IMPORTED_MODULE_5__.browserTracingIntegration is not a constructor

Here is my package.json

{
  "name": "frontend-tutorial-2",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "build": "webpack",
    "start": "webpack serve --mode development",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.22.5",
    "@babel/preset-env": "^7.22.5",
    "@babel/preset-react": "^7.22.5",
    "babel-loader": "^9.1.2",
    "css-loader": "^6.8.1",
    "html-webpack-plugin": "^5.5.3",
    "style-loader": "^3.3.3",
    "webpack": "^5.87.0",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "^4.15.1"
  },
  "dependencies": {
    "@sentry/react": "^8.37.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  }
}


### Suggested Solution

Using `Sentry.browserTracingIntegration(),`  seems to work

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Status

Waiting for: Support

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions