Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/strapi-plugin-sentry/node_modules/@sentry/tracing/dist/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Object.defineProperty(exports, "__esModule", { value: true });
var hub_1 = require("@sentry/hub");
exports.TRACEPARENT_REGEXP = new RegExp('^[ \\t]*' + // whitespace
'([0-9a-f]{32})?' + // trace_id
'-?([0-9a-f]{16})?' + // span_id
'-?([01])?' + // sampled
'[ \\t]*$');
/**
* Determines if tracing is currently enabled.
*
* Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.
*/
function hasTracingEnabled(options) {
if (options === void 0) { options = (_a = hub_1.getCurrentHub()
.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions(); }
var _a;
if (!options) {
return false;
}
return 'tracesSampleRate' in options || 'tracesSampler' in options;
}
exports.hasTracingEnabled = hasTracingEnabled;
/**
* Extract transaction context data from a `sentry-trace` header.
*
* @param traceparent Traceparent string
*
* @returns Object containing data from the header, or undefined if traceparent string is malformed
*/
function extractTraceparentData(traceparent) {
var matches = traceparent.match(exports.TRACEPARENT_REGEXP);
if (matches) {
var parentSampled = void 0;
if (matches[3] === '1') {
parentSampled = true;
}
else if (matches[3] === '0') {
parentSampled = false;
}
return {
traceId: matches[1],
parentSampled: parentSampled,
parentSpanId: matches[2],
};
}
return undefined;
}
exports.extractTraceparentData = extractTraceparentData;
/** Grabs active transaction off scope, if any */
function getActiveTransaction(hub) {
if (hub === void 0) { hub = hub_1.getCurrentHub(); }
var _a, _b;
return (_b = (_a = hub) === null || _a === void 0 ? void 0 : _a.getScope()) === null || _b === void 0 ? void 0 : _b.getTransaction();
}
exports.getActiveTransaction = getActiveTransaction;
/**
* Converts from milliseconds to seconds
* @param time time in ms
*/
function msToSec(time) {
return time / 1000;
}
exports.msToSec = msToSec;
/**
* Converts from seconds to milliseconds
* @param time time in seconds
*/
function secToMs(time) {
return time * 1000;
}
exports.secToMs = secToMs;
// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils
var utils_1 = require("@sentry/utils");
exports.stripUrlQueryAndFragment = utils_1.stripUrlQueryAndFragment;
//# sourceMappingURL=utils.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0421 ]-- |