import { InstrumentationConfig, InstrumentationBase, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
import * as anthropic from '@anthropic-ai/sdk';

interface AnthropicInstrumentationConfig extends InstrumentationConfig {
    /**
     * Whether to log prompts, completions and embeddings on traces.
     * @default true
     */
    traceContent?: boolean;
    /**
     * A custom logger to log any exceptions that happen during span creation.
     */
    exceptionLogger?: (e: Error) => void;
}

declare class AnthropicInstrumentation extends InstrumentationBase {
    protected _config: AnthropicInstrumentationConfig;
    constructor(config?: AnthropicInstrumentationConfig);
    setConfig(config?: AnthropicInstrumentationConfig): void;
    manuallyInstrument(module: typeof anthropic): void;
    protected init(): InstrumentationModuleDefinition;
    private patch;
    private unpatch;
    private patchAnthropic;
    private startSpan;
    private _streamingWrapPromise;
    private _wrapPromise;
    private _endSpan;
    private _shouldSendPrompts;
}

export { AnthropicInstrumentation, type AnthropicInstrumentationConfig };
