Skip to content

Commit

Permalink
bump sentry javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman committed May 8, 2024
1 parent 81d5221 commit 9221aab
Show file tree
Hide file tree
Showing 13 changed files with 785 additions and 439 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ package-lock.json

# Generated Lockfiles
Cartfile.resolved
sample/yalc.lock
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-cordova",
"version": "1.3.0",
"version": "1.3.3",
"main": "dist/js/sentry-cordova.js",
"types": "dist/js/sentry-cordova.d.ts",
"license": "MIT",
Expand All @@ -24,16 +24,16 @@
],
"description": "Official Sentry SDK for Cordova",
"dependencies": {
"@sentry/browser": "7.34.0",
"@sentry/core": "7.34.0",
"@sentry/hub": "7.34.0",
"@sentry/types": "7.34.0",
"@sentry/utils": "7.34.0",
"@sentry/wizard": "^3.21.0"
"@sentry/browser": "7.114.0",
"@sentry/core": "7.114.0",
"@sentry/hub": "7.114.0",
"@sentry/types": "7.114.0",
"@sentry/utils": "7.114.0",
"@sentry/wizard": "^3.22.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.34.0",
"@sentry-internal/typescript": "7.34.0",
"@sentry-internal/eslint-config-sdk": "7.114.0",
"@sentry-internal/typescript": "7.114.0",
"@types/cordova": "0.0.34",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.5",
Expand Down
10 changes: 5 additions & 5 deletions sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"devDependencies": {
"cordova-android": "^12.0.1",
"cordova-browser": "^7.0.0",
"cordova-ios": "^7.0.1",
"sentry-cordova": "file:.yalc/sentry-cordova"
},
"cordova": {
Expand All @@ -35,18 +34,19 @@
},
"platforms": [
"android",
"browser",
"ios"
"browser"
],
"plugins_comment": {
"sentry-cordova": {}
},
"plugins": {
"sentry-cordova": {}
"sentry-cordova": {
"SENTRY_ANDROID_SDK_VERSION": "7.6.0"
}
}
},
"dependencies": {
"cordova": "^12.0.0",
"typescript": "^5.2.2"
}
}
}
5 changes: 5 additions & 0 deletions sample/sentry.properties.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defaults.url=https://sentry.io/
defaults.org=sentry-sdks
defaults.project=sentry-cordova
auth.token=...
cli.executable=node_modules\\@sentry\\cli\\bin\\sentry-cli
12 changes: 11 additions & 1 deletion sample/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ function onDeviceReady() {
debug: true,
replaysSessionSampleRate: 1,
replaysOnErrorSampleRate: 1,
tracesSampleRate: 1
tracesSampleRate: 1,
profilesSampleRate: 1,
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: true,
}),
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration()

]
});

console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
Expand Down
29 changes: 16 additions & 13 deletions sample/www/js/otherpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ function onBackKeyDown() {
document.removeEventListener("backbutton", onBackKeyDown, false);
}

function wait(ms) {
var start = Date.now(),
now = start;
while (now - start < ms) {
now = Date.now();
}
}

function doPerformanceMonitor() {
// Start a Sentry transaction
const transaction = Sentry.instance.startTransaction({ name: 'example-transaction', op: 'example-operation' });

// Create a span inside the transaction
const span = transaction.startChild({ op: 'example-span-operation' });

// Simulate some work within the span
setTimeout(() => {
// Finish the span after 3 seconds
span.finish();

// Finish the transaction after all work is done
transaction.finish();
}, 3000);
wait(100);
Sentry.instance.startSpan({ name: 'example-transaction', op: 'example-operation' }, (span) =>
{
Sentry.instance.startSpan(({ op: 'example-span-operation' }), () => {
wait(100);
});
wait(100);
});
}
14 changes: 0 additions & 14 deletions sample/yalc.lock

This file was deleted.

Loading

0 comments on commit 9221aab

Please sign in to comment.