export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, a as LangWatchExporterOptions, b as LangWatchLogger, L as LangWatchTraceExporter, a as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, c as getLangWatchLoggerFromProvider, d as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-Cbelb5TK.js'; import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'; import { a as DataCaptureMode } from '../types-Dmazk5Bk.js'; export { b as DataCaptureConfig, c as DataCaptureContext, D as DataCaptureOptions, d as DataCapturePredicate } from '../types-Dmazk5Bk.js'; import { a as LangWatchSpan } from '../types-CmMOt86P.js'; export { I as INPUT_OUTPUT_TYPES, b as InputOutputType, J as JsonSerializable, c as LangWatchSpanMetrics, d as LangWatchSpanOptions, e as LangWatchSpanRAGContext, L as LangWatchTracer, S as SimpleChatMessage, f as SpanType, s as spanTypes } from '../types-CmMOt86P.js'; import { Span } from '@opentelemetry/api'; export { a as SemConvAttributeKey, S as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-BvCQH8F1.js'; import '@opentelemetry/sdk-trace-base'; import '@opentelemetry/exporter-trace-otlp-http'; import '@opentelemetry/core'; import '@opentelemetry/api-logs'; import 'zod'; import '@opentelemetry/semantic-conventions'; import '@opentelemetry/semantic-conventions/incubating'; interface LangWatchLogsExporterOptions { endpoint?: string; apiKey?: string; } /** * LangWatchLogsExporter extends the OpenTelemetry OTLP HTTP logs exporter * to send logs to LangWatch with proper authentication and metadata headers. * * This exporter automatically configures: * - Authorization headers using the provided API key or environment variables/fallback * - SDK version and language identification headers * - Proper endpoint configuration for LangWatch ingestion using provided URL or environment variables/fallback * * @example * ```typescript * import { LangWatchLogsExporter } from '@langwatch/observability'; * * // Using environment variables/fallback configuration * const exporter = new LangWatchLogsExporter(); * * // Using custom options * const exporter = new LangWatchLogsExporter({ * apiKey: 'your-api-key', * endpoint: 'https://custom.langwatch.com' * }); * ``` */ declare class LangWatchLogsExporter extends OTLPLogExporter { /** * Creates a new LangWatchLogsExporter instance. * * @param opts - Optional configuration options for the exporter. * @param opts.apiKey - Optional API key for LangWatch authentication. If not provided, * will use environment variables or fallback configuration. * @param opts.endpoint - Optional custom endpoint URL for LangWatch ingestion. * If not provided, will use environment variables or fallback configuration. */ constructor(opts?: LangWatchLogsExporterOptions); } /** * Predefined data capture configurations for common use cases. */ declare const DataCapturePresets: { /** * Capture both input and output - useful for development and debugging. */ readonly CAPTURE_ALL: DataCaptureMode; /** * Capture nothing - useful for high-security environments. */ readonly CAPTURE_NONE: DataCaptureMode; /** * Capture only inputs - useful when you want to see what's being sent. */ readonly INPUT_ONLY: DataCaptureMode; /** * Capture only outputs - useful when you want to see responses. */ readonly OUTPUT_ONLY: DataCaptureMode; }; /** * Creates a LangWatchSpan, which adds additional methods to an OpenTelemetry Span. * * @param span - The OpenTelemetry Span to add LangWatch methods to * @returns A LangWatchSpan with additional methods for LLM/GenAI observability * * @example * ```typescript * import { createLangWatchSpan } from './span'; * const otelSpan = tracer.startSpan('llm-call'); * const span = createLangWatchSpan(otelSpan); * span.setType('llm').setInput('Prompt').setOutput('Completion'); * ``` */ declare function createLangWatchSpan(span: Span): LangWatchSpan; /** * Determines the effective data capture mode. * * @returns The resolved {@link DataCaptureMode} ("all", "input", or "output"). * * @remarks * The mode is determined by the configuration, which can be a string, function, or object. Defaults to "all" if not specified. * * @example * ```ts * const mode = getDataCaptureMode(); * ``` */ declare function getDataCaptureMode(): DataCaptureMode; /** * Determines if input data should be captured. * * @returns `true` if input should be captured, otherwise `false`. * * @example * ```ts * if (shouldCaptureInput()) { * // Capture input * } * ``` */ declare function shouldCaptureInput(): boolean; /** * Determines if output data should be captured. * * @returns `true` if output should be captured, otherwise `false`. * * @example * ```ts * if (shouldCaptureOutput()) { * // Capture output * } * ``` */ declare function shouldCaptureOutput(): boolean; export { DataCaptureMode, DataCapturePresets, LangWatchLogsExporter, type LangWatchLogsExporterOptions, LangWatchSpan, createLangWatchSpan, getDataCaptureMode, shouldCaptureInput, shouldCaptureOutput };