import { ErrorCause } from "./error_serializer.mjs"; import { Span } from "@opentelemetry/api"; //#region src/record_exception.d.ts interface ExceptionMechanismOptions { type?: string; handled?: boolean; } interface BuildExceptionEventAttributesOptions { error: unknown; exceptionValue?: unknown; fallbackError?: Error; causeChain?: ErrorCause[]; shouldReport?: boolean; extraAttributes?: Record; mechanism?: ExceptionMechanismOptions; } interface RecordExceptionOptions { shouldReport?: boolean; extraAttributes?: Record; setStatus?: boolean; mechanism?: ExceptionMechanismOptions; } declare function toError(error: unknown, stackBoundary?: Function): Error; declare function buildExceptionEventAttributes(options: BuildExceptionEventAttributesOptions): Record; /** * Record an exception on a span while the original error object is still available. */ declare function recordException(span: Span, error: unknown, options?: RecordExceptionOptions): void; //#endregion export { BuildExceptionEventAttributesOptions, ExceptionMechanismOptions, RecordExceptionOptions, buildExceptionEventAttributes, recordException, toError };