@uptrace/web
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -8,3 +8,3 @@ "use strict"; | ||
var core_1 = require("@uptrace/core"); | ||
var hasWindow = typeof window === undefined; | ||
var hasWindow = typeof window !== undefined; | ||
function createClient(cfg) { | ||
@@ -34,14 +34,13 @@ if (cfg === void 0) { cfg = {}; } | ||
} | ||
cfg.filters.unshift(function (span) { | ||
if (!hasWindow) { | ||
if (hasWindow) { | ||
cfg.filters.unshift(function (span) { | ||
if (window.navigator && window.navigator.userAgent) { | ||
span.attrs['http.user_agent'] = String(window.navigator.userAgent); | ||
} | ||
if (window.location) { | ||
span.attrs['http.url'] = String(window.location); | ||
} | ||
return true; | ||
} | ||
if (window.navigator && window.navigator.userAgent) { | ||
span.attrs['http.user_agent'] = String(window.navigator.userAgent); | ||
} | ||
if (window.location) { | ||
span.attrs['http.url'] = String(window.location); | ||
} | ||
return true; | ||
}); | ||
}); | ||
} | ||
var client = core_1.createClient(cfg); | ||
@@ -66,9 +65,9 @@ if (hasWindow) { | ||
if (file) { | ||
attrs['frame.file'] = file; | ||
attrs['code.filepath'] = file; | ||
} | ||
if (line) { | ||
attrs['frame.line'] = line; | ||
attrs['code.lineno'] = line; | ||
} | ||
if (column) { | ||
attrs['frame.column'] = column; | ||
attrs['code.colno'] = column; | ||
} | ||
@@ -75,0 +74,0 @@ uptrace.reportException(String(message), attrs); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.1.2"; | ||
export declare const VERSION = "0.2.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.1.2'; | ||
exports.VERSION = '0.2.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@uptrace/web", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Uptrace JS exporter for browsers", | ||
@@ -52,21 +52,21 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.11.0", | ||
"@opentelemetry/context-zone": "^0.11.0", | ||
"@opentelemetry/api": "^0.12.0", | ||
"@opentelemetry/context-zone": "^0.12.0", | ||
"@opentelemetry/plugin-document-load": "^0.10.0", | ||
"@opentelemetry/tracing": "^0.11.0", | ||
"@opentelemetry/web": "^0.11.0", | ||
"@uptrace/core": "^0.1.2" | ||
"@opentelemetry/tracing": "^0.12.0", | ||
"@opentelemetry/web": "^0.12.0", | ||
"@uptrace/core": "^0.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "14.11.1", | ||
"@typescript-eslint/eslint-plugin": "4.1.1", | ||
"eslint": "7.9.0", | ||
"@types/node": "14.14.5", | ||
"@typescript-eslint/eslint-plugin": "4.6.0", | ||
"eslint": "7.12.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-prettier": "3.1.4", | ||
"gts": "2.0.2", | ||
"mocha": "8.1.3", | ||
"gts": "3.0.2", | ||
"mocha": "8.2.0", | ||
"nyc": "15.1.0", | ||
"ts-mocha": "7.0.0", | ||
"typescript": "4.0.3" | ||
"ts-mocha": "8.0.0", | ||
"typescript": "4.0.5" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8318
96
+ Added@opentelemetry/api@0.12.0(transitive)
+ Added@opentelemetry/context-base@0.12.0(transitive)
+ Added@opentelemetry/context-zone@0.12.0(transitive)
+ Added@opentelemetry/context-zone-peer-dep@0.12.0(transitive)
+ Added@opentelemetry/core@0.12.0(transitive)
+ Added@opentelemetry/resources@0.12.0(transitive)
+ Added@opentelemetry/semantic-conventions@0.12.0(transitive)
+ Added@opentelemetry/tracing@0.12.0(transitive)
+ Added@opentelemetry/web@0.12.0(transitive)
+ Added@uptrace/core@0.2.0(transitive)
- Removed@opentelemetry/context-zone@0.11.0(transitive)
- Removed@opentelemetry/context-zone-peer-dep@0.11.0(transitive)
- Removed@uptrace/core@0.1.2(transitive)
Updated@opentelemetry/api@^0.12.0
Updated@opentelemetry/web@^0.12.0
Updated@uptrace/core@^0.2.0