/**
 * Runtime telemetry module — OTel-compatible tracing and metrics.
 *
 * Provides a lightweight telemetry provider factory that wires together
 * a RuntimeTracer and RuntimeMeter with configurable exporters.
 *
 * @example
 * ```ts
 * import { createTelemetryProvider } from './index.js';
 * import { LocalLedgerExporter } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/exporters/index';
 *
 * const { tracer, meter } = createTelemetryProvider({
 *   tracer: {
 *     scope: 'goodvibes-sdk',
 *     enabled: true,
 *     exporters: [new LocalLedgerExporter({ filePath: '/tmp/spans.jsonl' })],
 *   },
 *   meter: { scope: 'goodvibes-sdk' },
 * });
 * ```
 */
import { RuntimeTracer } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/tracer';
import { RuntimeMeter } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/meter';
export { SpanStatusCode as SpanStatusCodes, SpanKind as SpanKinds } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/types';
// Re-export tracer and meter classes
export { RuntimeTracer } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/tracer';
export { RuntimeMeter } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/meter';
export { TelemetryApiService } from './api.js';
export { startTurnSpan, endTurnSpan, startToolSpan, recordToolPhase, endToolSpan, startLlmSpan, recordLlmStreamStart, endLlmSpan, startPluginSpan, recordPluginPhase, endPluginSpan, startMcpSpan, recordMcpPhase, endMcpSpan, startTransportSpan, recordTransportPhase, endTransportSpan, startTaskSpan, recordTaskPhase, endTaskSpan, startAgentSpan, recordAgentPhase, endAgentSpan, startPermissionSpan, recordPermissionPhase, endPermissionSpan, startSessionSpan, recordSessionPhase, endSessionSpan, startCompactionSpan, recordCompactionPhase, endCompactionSpan, recordHealthCascadeSpan, } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/spans/index';
export { LocalLedgerExporter, ConsoleExporter } from '@pellux/goodvibes-sdk/platform/runtime/telemetry/exporters/index';
export { DomainBridge, createInstrumentation } from './instrumentation/index.js';
/**
 * Create a telemetry provider — a paired RuntimeTracer and RuntimeMeter.
 *
 * When no config is supplied, a no-op provider is returned:
 * - Tracer is disabled (all spans are no-ops).
 * - Meter is initialised with the default scope `'goodvibes-sdk'`.
 *
 * @param config - Optional telemetry provider configuration.
 * @returns An object with `tracer` and `meter` instances.
 */
export function createTelemetryProvider(config) {
    const tracer = new RuntimeTracer(config?.tracer ?? {
        scope: 'goodvibes-sdk',
        enabled: false,
        exporters: [],
    });
    const meter = new RuntimeMeter(config?.meter ?? {
        scope: 'goodvibes-sdk',
    });
    return { tracer, meter };
}
