30 lines
958 B
JavaScript
30 lines
958 B
JavaScript
// Metro module 1081 (f1082).
|
|
import { defineIntegration, startSession, captureSession, debug } from "./Module817";
|
|
import { WINDOW } from "./ignoreNextOnError";
|
|
import { DEBUG_BUILD } from "./Module1072";
|
|
import { addHistoryInstrumentationHandler } from "./Module1033";
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
export const browserSessionIntegration = defineIntegration(() => ({
|
|
name: "BrowserSession",
|
|
setupOnce: () => {
|
|
if (WINDOW.document !== void 0) {
|
|
startSession({
|
|
ignoreDuration: true
|
|
});
|
|
captureSession();
|
|
addHistoryInstrumentationHandler(({ from, to }) => {
|
|
if (from !== void 0 && from !== to) {
|
|
startSession({
|
|
ignoreDuration: true
|
|
});
|
|
captureSession();
|
|
}
|
|
});
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");
|
|
}
|
|
}
|
|
}));
|