Skip to content

Commit 86c5009

Browse files
committed
fix circular dep check
1 parent a8050f5 commit 86c5009

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/core/src/tracing/utils.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,3 @@ export { stripUrlQueryAndFragment } from '@sentry/utils';
2727
* @deprecated Import this function from `@sentry/utils` instead
2828
*/
2929
export const extractTraceparentData = _extractTraceparentData;
30-
31-
/**
32-
* Converts a timestamp to second, if it was in milliseconds, or keeps it as second.
33-
*/
34-
export function ensureTimestampInSeconds(timestamp: number): number {
35-
const isMs = timestamp > 9999999999;
36-
return isMs ? timestamp / 1000 : timestamp;
37-
}

packages/core/src/utils/spanUtils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Span, SpanTimeInput, TraceContext } from '@sentry/types';
22
import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';
3-
import { ensureTimestampInSeconds } from '../tracing/utils';
43

54
/**
65
* Convert a span to a trace context, which can be sent as the `trace` context in an event.
@@ -47,3 +46,11 @@ export function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number
4746

4847
return timestampInSeconds();
4948
}
49+
50+
/**
51+
* Converts a timestamp to second, if it was in milliseconds, or keeps it as second.
52+
*/
53+
function ensureTimestampInSeconds(timestamp: number): number {
54+
const isMs = timestamp > 9999999999;
55+
return isMs ? timestamp / 1000 : timestamp;
56+
}

0 commit comments

Comments
 (0)