@uptrace/web
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,4 +0,3 @@ | ||
export { traceUrl } from '@uptrace/core'; | ||
export * from './uptrace'; | ||
export * from './version'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -13,7 +13,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.traceUrl = void 0; | ||
var core_1 = require("@uptrace/core"); | ||
Object.defineProperty(exports, "traceUrl", { enumerable: true, get: function () { return core_1.traceUrl; } }); | ||
__exportStar(require("./uptrace"), exports); | ||
__exportStar(require("./version"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -24,3 +24,3 @@ "use strict"; | ||
if (hasConsole) { | ||
console.error("root " + ctx.traceId + " already exists"); | ||
console.error("root ".concat(ctx.traceId, " already exists")); | ||
} | ||
@@ -27,0 +27,0 @@ return; |
@@ -6,2 +6,3 @@ import { Span, SpanAttributes, ContextManager, TextMapPropagator } from '@opentelemetry/api'; | ||
export declare function reportException(err: Error | string, attrs?: SpanAttributes): void; | ||
export declare function traceUrl(span: Span): string; | ||
export interface Config extends BaseConfig, TracerConfig { | ||
@@ -8,0 +9,0 @@ contextManager?: ContextManager; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WindowAttributesProcessor = exports.configureOpentelemetry = exports.reportException = void 0; | ||
exports.WindowAttributesProcessor = exports.configureOpentelemetry = exports.traceUrl = exports.reportException = void 0; | ||
var sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base"); | ||
@@ -10,3 +10,3 @@ var sdk_trace_web_1 = require("@opentelemetry/sdk-trace-web"); | ||
var hasWindow = typeof window !== 'undefined'; | ||
var _CLIENT = (0, core_1.createClient)(); | ||
var _CLIENT = (0, core_1.createClient)((0, core_1.parseDsn)('https://<key>@uptrace.dev/<project_id>')); | ||
function reportException(err, attrs) { | ||
@@ -17,2 +17,6 @@ if (attrs === void 0) { attrs = {}; } | ||
exports.reportException = reportException; | ||
function traceUrl(span) { | ||
return _CLIENT.traceUrl(span); | ||
} | ||
exports.traceUrl = traceUrl; | ||
function configureOpentelemetry(cfg) { | ||
@@ -34,4 +38,5 @@ configureResource(cfg); | ||
} | ||
var dsn; | ||
try { | ||
(0, core_1.parseDSN)(cfg.dsn); | ||
dsn = (0, core_1.parseDsn)(cfg.dsn); | ||
} | ||
@@ -42,2 +47,3 @@ catch (err) { | ||
} | ||
_CLIENT = (0, core_1.createClient)(dsn); | ||
var exporter = new exporter_collector_1.CollectorTraceExporter({ | ||
@@ -44,0 +50,0 @@ url: 'https://otlp.uptrace.dev/v1/traces', |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.0.2"; | ||
export declare const VERSION = "1.0.3"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '1.0.2'; | ||
exports.VERSION = '1.0.3'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@uptrace/web", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Uptrace JS exporter for browsers", | ||
@@ -53,3 +53,3 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "1.0.3", | ||
"@opentelemetry/api": "1.0.4", | ||
"@opentelemetry/core": "1.0.1", | ||
@@ -60,8 +60,8 @@ "@opentelemetry/exporter-collector": "0.25.0", | ||
"@opentelemetry/sdk-trace-web": "1.0.1", | ||
"@uptrace/core": "^1.0.2" | ||
"@uptrace/core": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "16.11.7", | ||
"@typescript-eslint/eslint-plugin": "5.3.1", | ||
"eslint": "8.2.0", | ||
"@types/node": "17.0.4", | ||
"@typescript-eslint/eslint-plugin": "5.8.0", | ||
"eslint": "8.5.0", | ||
"eslint-plugin-node": "11.1.0", | ||
@@ -73,4 +73,4 @@ "eslint-plugin-prettier": "4.0.0", | ||
"ts-mocha": "8.0.0", | ||
"typescript": "4.4.4" | ||
"typescript": "4.5.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
17510
244
+ Added@opentelemetry/api@1.0.4(transitive)
- Removed@opentelemetry/api@1.0.3(transitive)
Updated@opentelemetry/api@1.0.4
Updated@uptrace/core@^1.0.3