/** * Constants for MLflow Tracing */ /** * Enum for span types that can be used with MLflow Tracing */ export declare enum SpanType { LLM = "LLM", CHAIN = "CHAIN", AGENT = "AGENT", TOOL = "TOOL", CHAT_MODEL = "CHAT_MODEL", RETRIEVER = "RETRIEVER", PARSER = "PARSER", EMBEDDING = "EMBEDDING", RERANKER = "RERANKER", MEMORY = "MEMORY", UNKNOWN = "UNKNOWN" } /** * Severity level for an MLflow trace span. The public tracing API accepts a * `SpanLogLevel` member or its string name (e.g. "INFO"). */ export declare enum SpanLogLevel { DEBUG = 10, INFO = 20, WARNING = 30, ERROR = 40, CRITICAL = 50 } /** * Normalize an enum or string into a SpanLogLevel. Raw integers are not * accepted at the type level; the runtime number branch exists only because * `SpanLogLevel` is a numeric enum and its members arrive as primitive * numbers. */ export declare function toSpanLogLevel(value: SpanLogLevel | string): SpanLogLevel; /** * Constants for MLflow span attribute keys */ export declare const SpanAttributeKey: { EXPERIMENT_ID: string; TRACE_ID: string; INPUTS: string; OUTPUTS: string; SPAN_TYPE: string; LOG_LEVEL: string; TOKEN_USAGE: string; MESSAGE_FORMAT: string; }; /** * Constants for MLflow trace metadata keys */ export declare const TraceMetadataKey: { SOURCE_RUN: string; MODEL_ID: string; SIZE_BYTES: string; SCHEMA_VERSION: string; TOKEN_USAGE: string; TRACE_SESSION: string; TRACE_USER: string; INPUTS: string; OUTPUTS: string; }; /** * Constants for MLflow trace tag keys */ export declare const TraceTagKey: { MLFLOW_ARTIFACT_LOCATION: string; }; /** * Current version of the MLflow trace schema */ export declare const TRACE_SCHEMA_VERSION = "3"; /** * The prefix for MLflow trace IDs (V3 schema). */ export declare const TRACE_ID_PREFIX = "tr-"; /** * The prefix for V4 schema trace IDs (Databricks Unity Catalog backed * traces). Full format: `trace://`. */ export declare const TRACE_ID_V4_PREFIX = "trace:/"; /** * HTTP header used to route OTLP span uploads to a specific Databricks * Unity Catalog table when sending to /api/2.0/otel/v1/traces. */ export declare const DATABRICKS_UC_TABLE_HEADER = "X-Databricks-UC-Table-Name"; /** * HTTP header used to associate OTLP span uploads with an MLflow experiment * when sending to the OSS tracking server's /v1/traces endpoint. */ export declare const MLFLOW_EXPERIMENT_ID_HEADER = "x-mlflow-experiment-id"; /** * The default name for spans if the name is not provided when starting a span */ export declare const DEFAULT_SPAN_NAME = "span"; /** * Trace ID for no-op spans */ export declare const NO_OP_SPAN_TRACE_ID = "no-op-span-trace-id"; /** * Constants for token usage keys (matching Python TokenUsageKey) */ export declare const TokenUsageKey: { INPUT_TOKENS: string; OUTPUT_TOKENS: string; TOTAL_TOKENS: string; CACHE_READ_INPUT_TOKENS: string; CACHE_CREATION_INPUT_TOKENS: string; }; /** * Max length of the request/response preview in the trace info. */ export declare const REQUEST_RESPONSE_PREVIEW_MAX_LENGTH = 1000;