import { TraceData } from '../../core/entities/trace_data'; import { TraceInfo } from '../../core/entities/trace_info'; import { ArtifactsClient } from './base'; import { AuthProvider } from '../../auth'; /** * Options for creating a DatabricksArtifactsClient. */ export interface DatabricksArtifactsClientOptions { /** * The Databricks workspace host URL */ host: string; /** * Authentication provider */ authProvider: AuthProvider; } export declare class DatabricksArtifactsClient implements ArtifactsClient { private host; private headersProvider; constructor(options: DatabricksArtifactsClientOptions); /** * Upload trace data (spans) to the backend using artifact repository pattern. * * 1. Get credentials for upload * 2. Serialize trace data to JSON * 3. Upload to cloud storage using the credentials */ uploadTraceData(traceInfo: TraceInfo, traceData: TraceData): Promise; /** * Download trace data (spans) from cloud storage * Uses artifact repository pattern with signed URLs */ downloadTraceData(traceInfo: TraceInfo): Promise; /** * Get credentials for uploading trace data * Endpoint: GET /api/2.0/mlflow/traces/{request_id}/credentials-for-data-upload */ private getCredentialsForTraceDataUpload; /** * Get credentials for downloading trace data * Endpoint: GET /mlflow/traces/{trace_id}/credentials-for-data-download */ private getCredentialsForTraceDataDownload; /** * Upload data to cloud storage using the provided credentials */ private uploadToCloudStorage; /** * Upload data to cloud storage using signed URL (AWS S3 or GCP Storage) */ private uploadToSignedUrl; /** * Upload data to Azure Blob Storage using SAS URI * Uses simple PUT for all uploads since traces rarely exceed 100MB * https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview */ private uploadToAzureBlob; /** * Upload data to Azure Data Lake Storage Gen2 using SAS URI * https://learn.microsoft.com/en-us/rest/api/storageservices/data-lake-storage-gen2 */ private uploadToAzureAdlsGen2; /** * Download data from cloud storage using signed URL */ private downloadFromSignedUrl; } /** * HTTP header for artifact upload/download */ export interface HttpHeader { name: string; value: string; } /** * Artifact credential information for upload/download */ export interface ArtifactCredentialInfo { /** ID of the MLflow Run containing the artifact */ run_id?: string; /** Relative path to the artifact */ path?: string; /** Signed URI credential for artifact access */ signed_uri: string; /** HTTP headers for upload/download (optional, may not be present) */ headers?: HttpHeader[]; /** Type of signed credential URI */ type: ArtifactCredentialType; } /** * Enum for artifact credential types. * This ensures type safety when handling different cloud storage providers. */ export type ArtifactCredentialType = 'AWS_PRESIGNED_URL' | 'GCP_SIGNED_URL' | 'AZURE_SAS_URI' | 'AZURE_ADLS_GEN2_SAS_URI';