Skip to content

Commit

Permalink
review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Aug 13, 2024
1 parent 12b3ad6 commit 3b1088d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/js/tracing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ export function isNearToNow(timestamp: number): boolean {
* Uses `setMeasurement` function from @sentry/core.
*/
export function setSpanDurationAsMeasurement(name: string, span: Span): void {
const spanEnd = spanToJSON(span).timestamp;
const spanStart = spanToJSON(span).start_timestamp;
const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);
if (!spanEnd || !spanStart) {
return;
}
Expand All @@ -118,8 +117,7 @@ export function setSpanDurationAsMeasurementOnTransaction(
name: string,
span: Span,
): void {
const spanEnd = spanToJSON(span).timestamp;
const spanStart = spanToJSON(span).start_timestamp;
const { timestamp: spanEnd, start_timestamp: spanStart } = spanToJSON(span);
if (!spanEnd || !spanStart) {
return;
}
Expand Down

0 comments on commit 3b1088d

Please sign in to comment.