/**
 * @agentuity/telemetry - OpenTelemetry telemetry for Agentuity
 *
 * Auto-initializes from environment variables on import (Vercel-style).
 *
 * @example Automatic initialization (recommended)
 * ```typescript
 * // Just import - auto-configures from AGENTUITY_* env vars
 * import '@agentuity/telemetry';
 *
 * // Then access the globals anywhere
 * import { tracer, logger, meter } from '@agentuity/telemetry';
 * ```
 *
 * @example Explicit configuration
 * ```typescript
 * import { register } from '@agentuity/telemetry';
 *
 * register({
 *   name: 'my-app',
 *   version: '1.0.0',
 *   // ... optional overrides
 * });
 * ```
 */
// Re-export console reference for custom loggers
export { __originalConsole } from './logger';
// Re-export HTTP utilities for trace context propagation
export { injectTraceContextToHeaders, extractTraceContextFromRequest } from './http';
// Re-export trace state utilities
export { enrichContextWithTraceState, generateTraceId, generateSpanId, } from './tracestate';
// Core registration function
export { register, registerTelemetry, getTelemetry, ensureInitialized } from './telemetry';
import { ensureInitialized } from './telemetry';
/**
 * Get the OpenTelemetry tracer (auto-initialized)
 */
export const tracer = new Proxy({}, {
    get: (_, prop) => ensureInitialized().tracer[prop],
});
/**
 * Get the OpenTelemetry meter (auto-initialized)
 */
export const meter = new Proxy({}, {
    get: (_, prop) => ensureInitialized().meter[prop],
});
/**
 * Get the Logger instance (auto-initialized)
 */
export const logger = new Proxy({}, {
    get: (_, prop) => ensureInitialized().logger[prop],
});
/**
 * Shutdown telemetry (call on process exit)
 */
export async function shutdown() {
    const telemetry = ensureInitialized();
    if (telemetry?.shutdown) {
        await telemetry.shutdown();
    }
}
//# sourceMappingURL=index.js.map