import { type Attachment, type Event, type EventHint } from '@sentry/core'; import { type EventExtraContext, type EventTags, type ThrottleOverride } from './event-context.js'; /** * Symbol used to attach extra event context to events. This is particularly useful for errors so * they can be thrown while attaching this extra context to them. */ export declare const extraEventContextSymbol: unique symbol; /** * Symbol used to attach extra event tags to events. Used alongside extraEventContextSymbol for * attaching tag data to thrown errors. */ export declare const extraEventTagsSymbol: unique symbol; /** * Symbol used to attach extra event attachments to events. Used alongside extraEventContextSymbol * for attaching file data to thrown errors. */ export declare const extraEventAttachmentsSymbol: unique symbol; /** * Symbol used to attach a per-event throttle override to an event or error. The attached value is a * {@link ThrottleOverride}: at most one of `threshold` (tighten throttling for this event) or * `disabled` (bypass throttling entirely) may be set. */ export declare const extraEventThrottleSymbol: unique symbol; /** Simply describes an object that has extra event context. */ export type HasExtraContext = { [extraEventContextSymbol]: EventExtraContext; }; /** Simply describes an object that has extra event tags. */ export type HasExtraTags = { [extraEventTagsSymbol]: EventTags; }; /** Simply describes an object that has extra event attachments. */ export type HasExtraAttachments = { [extraEventAttachmentsSymbol]: ReadonlyArray; }; /** Simply describes an object that carries a per-event throttle override. */ export type HasExtraThrottle = { [extraEventThrottleSymbol]: ThrottleOverride; }; /** Type guard for whether any given input has extra event context. */ export declare function hasExtraEventContext(input: unknown): input is HasExtraContext; /** Type guard for whether any given input has extra event tags. */ export declare function hasExtraEventTags(input: unknown): input is HasExtraTags; /** Type guard for whether any given input has extra event attachments. */ export declare function hasExtraEventAttachments(input: unknown): input is HasExtraAttachments; /** Type guard for whether any given input carries a per-event throttle override. */ export declare function hasExtraEventThrottle(input: unknown): input is HasExtraThrottle; /** * Checks if extra event context has been injected into the input via extraEventContextSymbol and, * if so, extracts it. */ export declare function extractExtraContentFromSymbol(input: unknown): EventExtraContext | undefined; /** * Checks if extra event tags have been injected into the input via extraEventTagsSymbol and, if so, * extracts them. */ export declare function extractExtraTagsFromSymbol(input: unknown): EventTags | undefined; /** * Checks if extra event attachments have been injected into the input via * extraEventAttachmentsSymbol and, if so, extracts them. */ export declare function extractExtraAttachmentsFromSymbol(input: unknown): ReadonlyArray | undefined; /** * Tries to extract extra event context via extraEventContextSymbol. Returns undefined if there is * no extra event context. */ export declare function extractExtraEventContext(event: EventHint | Event): EventExtraContext | undefined; /** * Tries to extract extra event tags via extraEventTagsSymbol. Returns undefined if there are no * extra event tags. */ export declare function extractExtraEventTags(event: EventHint | Event): EventTags | undefined; /** * Tries to extract extra event attachments via extraEventAttachmentsSymbol. Returns undefined if * there are no extra event attachments. */ export declare function extractExtraEventAttachments(event: EventHint | Event): ReadonlyArray | undefined; /** * Tries to extract a per-event {@link ThrottleOverride} via extraEventThrottleSymbol from the input * itself or its originalException. Returns `undefined` if none is set. */ export declare function extractExtraEventThrottle(event: EventHint | Event): ThrottleOverride | undefined;