import { ApiKeysClient } from "./resources/api-keys.js"; import { ChannelsClient } from "./resources/channels.js"; import { ChecksClient } from "./resources/checks.js"; import { OrganizationsClient } from "./resources/organizations.js"; import { ProjectsClient } from "./resources/projects.js"; import type { PingOptions, SpanInterface, SpanOptions, SpanwiseConfig, TraceOptions, WrapOptions } from "./types.js"; export declare class Spanwise { private readonly baseUrl; private readonly apiKey; private readonly timeout; private readonly retries; private readonly enabled; private readonly tracingClient; private readonly instrumentations; readonly projects: ProjectsClient; readonly checks: ChecksClient; readonly channels: ChannelsClient; readonly organizations: OrganizationsClient; readonly apiKeys: ApiKeysClient; constructor(config?: SpanwiseConfig); private request; ping(slug: string, options?: PingOptions): Promise; /** * Wraps an async function with success/fail pings. * Optionally sends a start ping before execution for duration tracking. * Rethrows the original error after sending fail ping. * If no apiKey configured, just runs the function without pings. */ wrap(slug: string, fn: () => Promise, options?: WrapOptions): Promise; /** * Wrap an async operation with tracing. * Automatically handles span creation and error recording. */ trace(name: string, fn: (span: SpanInterface) => Promise, options?: TraceOptions): Promise; /** * Manually start a span. Call span.end() when done. */ startSpan(name: string, options?: SpanOptions): SpanInterface; /** * Capture an error without an associated span. */ captureError(error: Error, context?: Record): void; /** * Flush pending spans immediately. */ flushSpans(): Promise; /** * Destroy the client and clean up resources. * Stops any pending flush timers and discards pending spans. */ destroy(): void; } //# sourceMappingURL=client.d.ts.map