From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001 From: rxliuli Date: Tue, 4 Nov 2025 05:03:50 +0800 Subject: init commit --- .../tracing/esm/browser/metrics/utils.js | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 shared/logger/node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js (limited to 'shared/logger/node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js') diff --git a/shared/logger/node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js b/shared/logger/node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js new file mode 100644 index 0000000..ecb4873 --- /dev/null +++ b/shared/logger/node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js @@ -0,0 +1,25 @@ +/** + * Checks if a given value is a valid measurement value. + */ +function isMeasurementValue(value) { + return typeof value === 'number' && isFinite(value); +} + +/** + * Helper function to start child on transactions. This function will make sure that the transaction will + * use the start timestamp of the created child span if it is earlier than the transactions actual + * start timestamp. + */ +function _startChild(transaction, { startTimestamp, ...ctx }) { + if (startTimestamp && transaction.startTimestamp > startTimestamp) { + transaction.startTimestamp = startTimestamp; + } + + return transaction.startChild({ + startTimestamp, + ...ctx, + }); +} + +export { _startChild, isMeasurementValue }; +//# sourceMappingURL=utils.js.map -- cgit v1.2.3