/** * Types of trace locations */ export declare enum TraceLocationType { /** * Unspecified trace location type */ TRACE_LOCATION_TYPE_UNSPECIFIED = "TRACE_LOCATION_TYPE_UNSPECIFIED", /** * Trace is stored in an MLflow experiment */ MLFLOW_EXPERIMENT = "MLFLOW_EXPERIMENT", /** * Trace is stored in a Databricks inference table */ INFERENCE_TABLE = "INFERENCE_TABLE", /** * Trace is stored under a Databricks Unity Catalog table prefix. * The user-supplied prefix determines the span/log table names. */ UC_TABLE_PREFIX = "UC_TABLE_PREFIX" } /** * Interface representing an MLflow experiment location */ export interface MlflowExperimentLocation { /** * The ID of the MLflow experiment where the trace is stored */ experimentId: string; } /** * Interface representing a Databricks inference table location */ export interface InferenceTableLocation { /** * The fully qualified name of the inference table where the trace is stored */ fullTableName: string; } /** * Interface representing a Databricks Unity Catalog table-prefix location. * Mirrors Python's `UnityCatalog` location. */ export interface UnityCatalogLocation { catalogName: string; schemaName: string; /** Customer-supplied table prefix; required for trace ID location string. */ tablePrefix?: string; /** Backend-populated fully qualified spans table name. */ otelSpansTableName?: string; /** Backend-populated fully qualified logs table name. */ otelLogsTableName?: string; /** Backend-populated fully qualified annotations table name. */ annotationsTableName?: string; } /** * Interface representing the location where the trace is stored */ export interface TraceLocation { /** * The type of the trace location */ type: TraceLocationType; /** * The MLflow experiment location * Set this when the location type is MLflow experiment */ mlflowExperiment?: MlflowExperimentLocation; /** * The inference table location * Set this when the location type is Databricks Inference table */ inferenceTable?: InferenceTableLocation; /** * The Databricks UC table-prefix location. Set when type is UC_TABLE_PREFIX. */ ucTablePrefix?: UnityCatalogLocation; } export interface SerializedTraceLocation { type: TraceLocationType; mlflow_experiment?: { experiment_id: string; }; inference_table?: { full_table_name: string; }; uc_table_prefix?: { catalog_name: string; schema_name: string; table_prefix?: string; otel_spans_table_name?: string; otel_logs_table_name?: string; annotations_table_name?: string; }; } export declare function serializeTraceLocation(loc: TraceLocation): SerializedTraceLocation; export declare function deserializeTraceLocation(json: SerializedTraceLocation | undefined): TraceLocation; /** * Returns "catalog.schema.table_prefix" for a UC table-prefix location. * Throws if the prefix is not set; the prefix is required for trace IDs. */ export declare function ucTablePrefixLocationString(location: UnityCatalogLocation): string; /** * Get the location string used for V4 trace IDs and UC OTLP routing * (i.e. the `X-Databricks-UC-Table-Name` header value). */ export declare function getUcLocationString(traceLocation: TraceLocation): string | null; /** * Get the fully qualified OTel spans table name to use as the * `X-Databricks-UC-Table-Name` header when exporting spans for this * trace via OTLP. * * Falls back to `.._otel_spans`, which is the * default spans table name Databricks creates when a UC trace location is * provisioned. Customers with a custom backend-provisioned spans table can * override by setting `ucTablePrefix.otelSpansTableName`. */ export declare function getOtelSpansTableName(traceLocation: TraceLocation): string | null; /** * Create a TraceLocation from an experiment ID * @param experimentId The ID of the MLflow experiment */ export declare function createTraceLocationFromExperimentId(experimentId: string): TraceLocation; /** * Create a TraceLocation from a Databricks UC table-prefix location. */ export declare function createTraceLocationFromUcTablePrefix(catalogName: string, schemaName: string, tablePrefix: string): TraceLocation; /** * True iff the trace is stored in a Databricks Unity Catalog location. */ export declare function isUcTraceLocation(traceLocation: TraceLocation): boolean;