Skip to content

Commit 7a019ea

Browse files
Revert "remove exclusiveTime as a field from spans"
This reverts commit 2b495f1.
1 parent 2b495f1 commit 7a019ea

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/core/src/tracing/span.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export class Span implements SpanInterface {
120120
protected _endTime?: number | undefined;
121121
/** Internal keeper of the status */
122122
protected _status?: SpanStatusType | string | undefined;
123+
protected _exclusiveTime?: number;
123124

124125
private _logMessage?: string;
125126

@@ -164,6 +165,9 @@ export class Span implements SpanInterface {
164165
if (spanContext.endTimestamp) {
165166
this._endTime = spanContext.endTimestamp;
166167
}
168+
if (spanContext.exclusiveTime) {
169+
this._exclusiveTime = spanContext.exclusiveTime;
170+
}
167171
}
168172

169173
// This rule conflicts with another eslint rule :(
@@ -631,6 +635,7 @@ export class Span implements SpanInterface {
631635
trace_id: this._traceId,
632636
origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,
633637
_metrics_summary: getMetricSummaryJsonForSpan(this),
638+
exclusive_time: this._exclusiveTime,
634639
measurements: this._attributes[SEMANTIC_ATTRIBUTE_MEASUREMENTS] as Measurements | undefined,
635640
});
636641
}

packages/types/src/span.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ export interface SpanContext {
181181
* The origin of the span, giving context about what created the span.
182182
*/
183183
origin?: SpanOrigin | undefined;
184+
185+
/**
186+
* Exclusive time in milliseconds.
187+
*/
188+
exclusiveTime?: number;
184189
}
185190

186191
/** Span holding trace_id, span_id */

0 commit comments

Comments
 (0)