src/mlflow
MLflow user-feedback logging: detect whether MLflow tracing is wired for this deployment, and log a thumbs / comment as a trace assessment via the Databricks MLflow REST API.
Feedback attaches to a trace, and the plugin’s spans reach MLflow
through the same OTel pipeline as every other AppKit span (see
observability.ts). On Databricks Apps that pipeline is the UC
sidecar injected by telemetry_export_destinations, not a direct
workspace OTLP URL. MLflow derives its trace id from the OpenTelemetry
trace id (tr-<hex(otelTraceId)>), so the server stamps the active
trace id on each turn’s response and the client sends it back here.
There is no MLflow JS SDK, so this posts to the assessments REST
endpoint directly using the OBO-scoped workspace client (the feedback
is thus attributed to the signed-in user). UC-backed Apps traces need
the experiment’s table-prefix URI (trace:/{catalog}.{schema}.{prefix}/{tr-hex})
rather than the experiment-store id the UI does not store. That prefix is
read from the experiment’s mlflow.experiment.databricksTraceDestinationPath
tag (or the spans-table tag); MLFLOW_UC_TRACE_PREFIX remains an optional
override. Trace export is asynchronous, so the just-finished trace may not
exist in MLflow yet when the user reacts; the log call retries briefly on
“not found” before giving up softly.
Classes
Section titled “Classes”Interfaces
Section titled “Interfaces”Type Aliases
Section titled “Type Aliases”Functions
Section titled “Functions”- appMlflowTraceInfoConfigured
- directMlflowTraceLocation
- directMlflowTracingActive
- directMlflowTracingConfigured
- directMlflowTrackingUri
- flushDirectMlflowTracing
- initializeAppMlflowTraceInfo
- initializeDirectMlflowTracing
- logFeedback
- mlflowAssessmentTraceId
- mlflowEnabled
- mlflowExperimentManagerUrl
- persistAppMlflowTraceInfo
- resetAppMlflowTraceInfo
- resetUcTracePrefixCache
- resolveFeedbackEnabled
- ucTracePrefixFromExperimentTags
- updateActiveMlflowTrace
- updateActiveMlflowTraceTags
- validateFeedbackConfig