@uptrace/core
Advanced tools
Comparing version 1.17.0 to 1.18.0
@@ -11,6 +11,7 @@ "use strict"; | ||
Client.prototype.traceUrl = function (span) { | ||
var _a; | ||
var _a, _b; | ||
var ctx = span.spanContext(); | ||
var traceId = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.traceId) !== null && _a !== void 0 ? _a : '<no span>'; | ||
return "".concat(this._dsn.appAddr(), "/traces/").concat(traceId); | ||
var traceId = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.traceId) !== null && _a !== void 0 ? _a : '<no trace>'; | ||
var spanId = (_b = ctx === null || ctx === void 0 ? void 0 : ctx.spanId) !== null && _b !== void 0 ? _b : '<no span>'; | ||
return "".concat(this._dsn.siteUrl(), "/traces/").concat(traceId, "?span_id=").concat(spanId); | ||
}; | ||
@@ -17,0 +18,0 @@ // reportException reports an exception as a span event creating a dummy span if necessary. |
@@ -15,10 +15,8 @@ import { IResource } from '@opentelemetry/resources'; | ||
host: string; | ||
projectId: string; | ||
token: string; | ||
constructor(s: string | undefined); | ||
toString(): string; | ||
appAddr(): string; | ||
otlpAddr(): string; | ||
siteUrl(): string; | ||
otlpHttpEndpoint(): string; | ||
} | ||
export declare function parseDsn(s: string | undefined): Dsn; | ||
//# sourceMappingURL=config.d.ts.map |
@@ -35,4 +35,2 @@ "use strict"; | ||
this.host = ''; | ||
this.projectId = ''; | ||
this.token = ''; | ||
if (!s) { | ||
@@ -54,7 +52,2 @@ throw new Error('either dsn option or UPTRACE_DSN is required'); | ||
} | ||
if (this.host !== 'uptrace.dev') { | ||
return; | ||
} | ||
this.projectId = u.pathname.slice(1); | ||
this.token = u.username; | ||
} | ||
@@ -64,3 +57,3 @@ Dsn.prototype.toString = function () { | ||
}; | ||
Dsn.prototype.appAddr = function () { | ||
Dsn.prototype.siteUrl = function () { | ||
if (this.host === 'uptrace.dev') { | ||
@@ -71,3 +64,3 @@ return 'https://app.uptrace.dev'; | ||
}; | ||
Dsn.prototype.otlpAddr = function () { | ||
Dsn.prototype.otlpHttpEndpoint = function () { | ||
if (this.host === 'uptrace.dev') { | ||
@@ -74,0 +67,0 @@ return 'https://otlp.uptrace.dev'; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.17.0"; | ||
export declare const VERSION = "1.18.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '1.17.0'; | ||
exports.VERSION = '1.18.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@uptrace/core", | ||
"version": "1.17.0", | ||
"version": "1.18.0", | ||
"description": "Uptrace JS core", | ||
@@ -37,15 +37,15 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "~1.6.0", | ||
"@opentelemetry/core": "~1.17.1", | ||
"@opentelemetry/instrumentation": "~0.44.0", | ||
"@opentelemetry/resources": "~1.17.1", | ||
"@opentelemetry/sdk-trace-base": "~1.17.1", | ||
"@opentelemetry/api": "~1.7.0", | ||
"@opentelemetry/core": "~1.18.0", | ||
"@opentelemetry/instrumentation": "~0.45.0", | ||
"@opentelemetry/resources": "~1.18.0", | ||
"@opentelemetry/sdk-trace-base": "~1.18.0", | ||
"cross-fetch": "4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "10.0.3", | ||
"@types/node": "20.8.7", | ||
"@types/sinon": "10.0.20", | ||
"@typescript-eslint/eslint-plugin": "6.8.0", | ||
"eslint": "8.51.0", | ||
"@types/mocha": "10.0.4", | ||
"@types/node": "20.8.10", | ||
"@types/sinon": "17.0.0", | ||
"@typescript-eslint/eslint-plugin": "6.10.0", | ||
"eslint": "8.53.0", | ||
"eslint-plugin-node": "11.1.0", | ||
@@ -56,3 +56,3 @@ "eslint-plugin-prettier": "5.0.1", | ||
"nyc": "15.1.0", | ||
"sinon": "16.1.3", | ||
"sinon": "17.0.1", | ||
"ts-mocha": "10.0.0", | ||
@@ -59,0 +59,0 @@ "typescript": "5.2.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13662
217
+ Added@opentelemetry/api@1.7.0(transitive)
+ Added@opentelemetry/core@1.18.1(transitive)
+ Added@opentelemetry/instrumentation@0.45.1(transitive)
+ Added@opentelemetry/resources@1.18.1(transitive)
+ Added@opentelemetry/sdk-trace-base@1.18.1(transitive)
+ Added@opentelemetry/semantic-conventions@1.18.1(transitive)
- Removed@opentelemetry/api@1.6.0(transitive)
- Removed@opentelemetry/core@1.17.1(transitive)
- Removed@opentelemetry/instrumentation@0.44.0(transitive)
- Removed@opentelemetry/resources@1.17.1(transitive)
- Removed@opentelemetry/sdk-trace-base@1.17.1(transitive)
- Removed@opentelemetry/semantic-conventions@1.17.1(transitive)
Updated@opentelemetry/api@~1.7.0
Updated@opentelemetry/core@~1.18.0