@sentry/tracing
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -129,2 +129,10 @@ import { Primitive, Span as SpanInterface, SpanContext, Transaction } from '@sentry/types'; | ||
*/ | ||
toContext(): SpanContext; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
updateWithContext(spanContext: SpanContext): this; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
getTraceContext(): { | ||
@@ -131,0 +139,0 @@ data?: { |
@@ -184,2 +184,38 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
*/ | ||
Span.prototype.toContext = function () { | ||
return utils_1.dropUndefinedKeys({ | ||
data: this.data, | ||
description: this.description, | ||
endTimestamp: this.endTimestamp, | ||
op: this.op, | ||
parentSpanId: this.parentSpanId, | ||
sampled: this.sampled, | ||
spanId: this.spanId, | ||
startTimestamp: this.startTimestamp, | ||
status: this.status, | ||
tags: this.tags, | ||
traceId: this.traceId, | ||
}); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Span.prototype.updateWithContext = function (spanContext) { | ||
var _a, _b, _c, _d, _e; | ||
this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {})); | ||
this.description = spanContext.description; | ||
this.endTimestamp = spanContext.endTimestamp; | ||
this.op = spanContext.op; | ||
this.parentSpanId = spanContext.parentSpanId; | ||
this.sampled = spanContext.sampled; | ||
this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId)); | ||
this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp)); | ||
this.status = spanContext.status; | ||
this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {})); | ||
this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId)); | ||
return this; | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Span.prototype.getTraceContext = function () { | ||
@@ -186,0 +222,0 @@ return utils_1.dropUndefinedKeys({ |
@@ -12,3 +12,3 @@ import { Hub } from '@sentry/hub'; | ||
private readonly _hub; | ||
private readonly _trimEnd?; | ||
private _trimEnd?; | ||
/** | ||
@@ -40,3 +40,11 @@ * This constructor should never be called manually. Those instrumenting tracing should use | ||
finish(endTimestamp?: number): string | undefined; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
toContext(): TransactionContext; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
updateWithContext(transactionContext: TransactionContext): this; | ||
} | ||
//# sourceMappingURL=transaction.d.ts.map |
@@ -103,2 +103,19 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Transaction.prototype.toContext = function () { | ||
var spanContext = _super.prototype.toContext.call(this); | ||
return utils_1.dropUndefinedKeys(tslib_1.__assign(tslib_1.__assign({}, spanContext), { name: this.name, trimEnd: this._trimEnd })); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Transaction.prototype.updateWithContext = function (transactionContext) { | ||
var _a; | ||
_super.prototype.updateWithContext.call(this, transactionContext); | ||
this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : '')); | ||
this._trimEnd = transactionContext.trimEnd; | ||
return this; | ||
}; | ||
return Transaction; | ||
@@ -105,0 +122,0 @@ }(span_1.Span)); |
@@ -129,2 +129,10 @@ import { Primitive, Span as SpanInterface, SpanContext, Transaction } from '@sentry/types'; | ||
*/ | ||
toContext(): SpanContext; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
updateWithContext(spanContext: SpanContext): this; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
getTraceContext(): { | ||
@@ -131,0 +139,0 @@ data?: { |
@@ -183,2 +183,38 @@ import { __assign } from "tslib"; | ||
*/ | ||
Span.prototype.toContext = function () { | ||
return dropUndefinedKeys({ | ||
data: this.data, | ||
description: this.description, | ||
endTimestamp: this.endTimestamp, | ||
op: this.op, | ||
parentSpanId: this.parentSpanId, | ||
sampled: this.sampled, | ||
spanId: this.spanId, | ||
startTimestamp: this.startTimestamp, | ||
status: this.status, | ||
tags: this.tags, | ||
traceId: this.traceId, | ||
}); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Span.prototype.updateWithContext = function (spanContext) { | ||
var _a, _b, _c, _d, _e; | ||
this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {})); | ||
this.description = spanContext.description; | ||
this.endTimestamp = spanContext.endTimestamp; | ||
this.op = spanContext.op; | ||
this.parentSpanId = spanContext.parentSpanId; | ||
this.sampled = spanContext.sampled; | ||
this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId)); | ||
this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp)); | ||
this.status = spanContext.status; | ||
this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {})); | ||
this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId)); | ||
return this; | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Span.prototype.getTraceContext = function () { | ||
@@ -185,0 +221,0 @@ return dropUndefinedKeys({ |
@@ -12,3 +12,3 @@ import { Hub } from '@sentry/hub'; | ||
private readonly _hub; | ||
private readonly _trimEnd?; | ||
private _trimEnd?; | ||
/** | ||
@@ -40,3 +40,11 @@ * This constructor should never be called manually. Those instrumenting tracing should use | ||
finish(endTimestamp?: number): string | undefined; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
toContext(): TransactionContext; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
updateWithContext(transactionContext: TransactionContext): this; | ||
} | ||
//# sourceMappingURL=transaction.d.ts.map |
import { __assign, __extends } from "tslib"; | ||
import { getCurrentHub, Hub } from '@sentry/hub'; | ||
import { isInstanceOf, logger } from '@sentry/utils'; | ||
import { dropUndefinedKeys, isInstanceOf, logger } from '@sentry/utils'; | ||
import { Span as SpanClass, SpanRecorder } from './span'; | ||
@@ -102,2 +102,19 @@ /** JSDoc */ | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Transaction.prototype.toContext = function () { | ||
var spanContext = _super.prototype.toContext.call(this); | ||
return dropUndefinedKeys(__assign(__assign({}, spanContext), { name: this.name, trimEnd: this._trimEnd })); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
Transaction.prototype.updateWithContext = function (transactionContext) { | ||
var _a; | ||
_super.prototype.updateWithContext.call(this, transactionContext); | ||
this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : '')); | ||
this._trimEnd = transactionContext.trimEnd; | ||
return this; | ||
}; | ||
return Transaction; | ||
@@ -104,0 +121,0 @@ }(SpanClass)); |
{ | ||
"name": "@sentry/tracing", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"description": "Extensions for Sentry AM", | ||
@@ -19,11 +19,11 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "6.0.2", | ||
"@sentry/minimal": "6.0.2", | ||
"@sentry/types": "6.0.2", | ||
"@sentry/utils": "6.0.2", | ||
"@sentry/hub": "6.0.3", | ||
"@sentry/minimal": "6.0.3", | ||
"@sentry/types": "6.0.3", | ||
"@sentry/utils": "6.0.3", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@sentry-internal/eslint-config-sdk": "6.0.2", | ||
"@sentry/browser": "6.0.2", | ||
"@sentry-internal/eslint-config-sdk": "6.0.3", | ||
"@sentry/browser": "6.0.3", | ||
"@types/express": "^4.17.1", | ||
@@ -30,0 +30,0 @@ "@types/jsdom": "^16.2.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
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
2161912
16020
+ Added@sentry/hub@6.0.3(transitive)
+ Added@sentry/minimal@6.0.3(transitive)
+ Added@sentry/types@6.0.3(transitive)
+ Added@sentry/utils@6.0.3(transitive)
- Removed@sentry/hub@6.0.2(transitive)
- Removed@sentry/minimal@6.0.2(transitive)
- Removed@sentry/types@6.0.2(transitive)
- Removed@sentry/utils@6.0.2(transitive)
Updated@sentry/hub@6.0.3
Updated@sentry/minimal@6.0.3
Updated@sentry/types@6.0.3
Updated@sentry/utils@6.0.3