@sentry/browser
Version:
Official Sentry SDK for browsers
24 lines (23 loc) • 769 B
JavaScript
import { linkTraces } from "../tracing/linkedTraces.js";
import { defineIntegration } from "@sentry/core";
import { isBotUserAgent } from "@sentry/browser-utils";
// src/integrations/linkedTraces.ts
const _linkedTracesIntegration = ((options = {}) => {
const { storage = "in-memory", consistentTraceSampling = false } = options;
return {
name: "LinkedTraces",
setup(client) {
if (isBotUserAgent()) return;
linkTraces(client, {
linkPreviousTrace: storage,
consistentTraceSampling
});
}
};
});
/**
* Links each new trace to the previous one, so you can navigate between traces in Sentry.
*/
const linkedTracesIntegration = defineIntegration(_linkedTracesIntegration);
export { linkedTracesIntegration };
//# sourceMappingURL=linkedTraces.js.map