@sentry/browser
Version:
Official Sentry SDK for browsers
33 lines (32 loc) • 1.31 kB
TypeScript
import { Span } from '@sentry/core';
import { SpanContextData } from '@sentry/core';
export interface PreviousTraceInfo {
/**
* Span context of the previous trace's local root span
*/
spanContext: SpanContextData;
/**
* Timestamp in seconds when the previous trace was started
*/
startTimestamp: number;
}
export declare const PREVIOUS_TRACE_MAX_DURATION = 3600;
export declare const PREVIOUS_TRACE_KEY = "sentry_previous_trace";
export declare const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = "sentry.previous_trace";
/**
* Adds a previous_trace span link to the passed span if the passed
* previousTraceInfo is still valid.
*
* @returns the updated previous trace info (based on the current span/trace) to
* be used on the next call
*/
export declare function addPreviousTraceSpanLink(previousTraceInfo: PreviousTraceInfo | undefined, span: Span): PreviousTraceInfo;
/**
* Stores @param previousTraceInfo in sessionStorage.
*/
export declare function storePreviousTraceInSessionStorage(previousTraceInfo: PreviousTraceInfo): void;
/**
* Retrieves the previous trace from sessionStorage if available.
*/
export declare function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined;
//# sourceMappingURL=previousTrace.d.ts.map