UNPKG

next

Version:

The React Framework

37 lines (36 loc) • 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getRequestInsightsIdentity: null, runWithRequestInsightsIdentity: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getRequestInsightsIdentity: function() { return getRequestInsightsIdentity; }, runWithRequestInsightsIdentity: function() { return runWithRequestInsightsIdentity; } }); const _asynclocalstorage = require("../../app-render/async-local-storage"); // This storage covers the part of BaseServer request handling that runs before // App Render creates workAsyncStorage. Once available, workStore remains the // primary identity source for locally recorded spans. function getRequestInsightsIdentityStorage() { return (0, _asynclocalstorage.getOrCreateGlobalAsyncLocalStorage)('request-insights-identity-storage'); } function runWithRequestInsightsIdentity(identity, fn) { return getRequestInsightsIdentityStorage().run(identity, fn); } function getRequestInsightsIdentity() { return getRequestInsightsIdentityStorage().getStore(); } //# sourceMappingURL=request-insights-identity.js.map