import { a as EnvironmentContext, v as RouteConfig, w as TransportConfig, y as SamplingConfig } from "../types-B82IuY7M.mjs"; import * as _nuxt_schema0 from "@nuxt/schema"; //#region src/nuxt/module.d.ts interface ModuleAxiomBaseConfig { /** Axiom dataset name */ dataset: string; /** Axiom API token */ token: string; /** Organization ID (required for Personal Access Tokens) */ orgId?: string; /** Request timeout in milliseconds. Default: 5000 */ timeout?: number; } interface ModuleAxiomEdgeConfig { /** * Edge URL for Axiom ingest/query endpoints. * If no path is provided, uses /v1/ingest/{dataset}. * If a custom path is provided, it is used as-is (trailing slash trimmed). */ edgeUrl: string; /** Mutually exclusive with edgeUrl. */ baseUrl?: never; } interface ModuleAxiomEndpointConfig { /** Base URL for Axiom API. Uses /v1/datasets/{dataset}/ingest. */ baseUrl?: string; /** Mutually exclusive with baseUrl. */ edgeUrl?: never; } type ModuleAxiomConfig = ModuleAxiomBaseConfig & (ModuleAxiomEdgeConfig | ModuleAxiomEndpointConfig); interface ModuleOptions { /** * Enable or disable all logging globally. * When false, all emits, tagged logs, and request logger operations become no-ops. * @default true */ enabled?: boolean; /** * Environment context overrides. */ env?: Partial; /** * Enable or disable browser console output. * When false, client-side logs are suppressed in the browser DevTools console * but still sent to the server via transport (if enabled). * @default true */ console?: boolean; /** * Enable pretty printing. * @default true in development, false in production */ pretty?: boolean; /** * Route patterns to include in logging. * Supports glob patterns like '/api/**'. * If not set, all routes are logged. * @example ['/api/**', '/auth/**'] */ include?: string[]; /** * Route patterns to exclude from logging. * Supports glob patterns like '/api/_nuxt_icon/**'. * Exclusions take precedence over inclusions. * @example ['/api/_nuxt_icon/**', '/health'] */ exclude?: string[]; /** * Route-specific service configuration. * Allows setting different service names for different routes. * Patterns are matched using glob syntax. * * @example * ```ts * routes: { * '/api/foo/**': { service: 'service1' }, * '/api/bar/**': { service: 'service2' } * } * ``` */ routes?: Record; /** * Sampling configuration for filtering logs. * Allows configuring what percentage of logs to keep per level. * * @example * ```ts * sampling: { * rates: { * info: 10, // Keep 10% of info logs * warn: 50, // Keep 50% of warning logs * debug: 5, // Keep 5% of debug logs * error: 100, // Always keep errors (default) * } * } * ``` */ sampling?: SamplingConfig; /** * Transport configuration for sending client logs to the server. * * @example * ```ts * transport: { * enabled: true, // Send logs to server API * endpoint: '/api/_mxllog/ingest' // Custom endpoint * } * ``` */ transport?: TransportConfig; /** * Axiom adapter configuration. * When configured, use `createAxiomDrain()` from `@safaricom-mxl/log/axiom` to send logs. * * @example * ```ts * axiom: { * dataset: 'my-app-logs', * token: process.env.AXIOM_TOKEN, * } * ``` */ axiom?: ModuleAxiomConfig; /** * OTLP adapter configuration. * When configured, use `createOTLPDrain()` from `@safaricom-mxl/log/otlp` to send logs. * * @example * ```ts * otlp: { * endpoint: 'http://localhost:4318', * headers: { * 'Authorization': `Basic ${process.env.GRAFANA_TOKEN}`, * }, * } * ``` */ otlp?: { /** OTLP HTTP endpoint (e.g., http://localhost:4318) */endpoint: string; /** Override service name (defaults to event.service) */ serviceName?: string; /** Additional resource attributes */ resourceAttributes?: Record; /** Custom headers (e.g., for authentication) */ headers?: Record; /** Request timeout in milliseconds. Default: 5000 */ timeout?: number; }; /** * PostHog adapter configuration. * When configured, use `createPostHogDrain()` from `@safaricom-mxl/log/posthog` to send logs * via PostHog Logs (OTLP). * * @example * ```ts * posthog: { * apiKey: process.env.POSTHOG_API_KEY, * } * ``` */ posthog?: { /** PostHog project API key */apiKey: string; /** PostHog host URL. Default: https://us.i.posthog.com */ host?: string; /** Request timeout in milliseconds. Default: 5000 */ timeout?: number; }; /** * Sentry adapter configuration. * When configured, use `createSentryDrain()` from `@safaricom-mxl/log/sentry` to send logs. * * @example * ```ts * sentry: { * dsn: process.env.SENTRY_DSN, * } * ``` */ sentry?: { /** Sentry DSN */dsn: string; /** Environment override (defaults to event.environment) */ environment?: string; /** Release version override (defaults to event.version) */ release?: string; /** Additional tags to attach as attributes */ tags?: Record; /** Request timeout in milliseconds. Default: 5000 */ timeout?: number; }; /** * How long to retain events before cleanup (used by @safaricom-mxl/nuxthub). * Supports "30d" (days), "24h" (hours), "60m" (minutes). * @default '30d' */ retention?: string; } declare const _default: _nuxt_schema0.NuxtModule; //#endregion export { ModuleOptions, _default as default }; //# sourceMappingURL=module.d.mts.map