mlflow/mlflow · warning
Unable to derive UC location string for ${JSON.stringify(thi
Error message
Unable to derive UC location string for ${JSON.stringify(this._location)}; skipping trace registration. What it means
The UC table trace exporter registers traces against a Unity Catalog location. getUcLocationString() failed to derive a location string from this._location, so trace registration is skipped and this warning is logged. Without a valid location string the exporter cannot construct the v4 trace ID or the destination UC table, so exporting traces from this span processor is impossible.
Source
Thrown at libs/typescript/core/src/exporters/uc_table.ts:62
private _location: UnityCatalogLocation;
constructor(exporter: SpanExporter, location: UnityCatalogLocation) {
this._exporter = exporter;
this._location = location;
}
onStart(span: OTelSpan, _parentContext: Context): void {
const otelTraceId = span.spanContext().traceId;
if (!span.parentSpanContext?.spanId) {
// Root span: build the V4 trace ID and TraceInfo for this trace.
const traceLocation: TraceLocation = {
type: TraceLocationType.UC_TABLE_PREFIX,
ucTablePrefix: { ...this._location },
};
const locationString = getUcLocationString(traceLocation);
if (!locationString) {
console.warn(
`Unable to derive UC location string for ${JSON.stringify(this._location)}; skipping trace registration.`,
);
return;
}
const traceId = constructTraceIdV4(locationString, otelTraceId);
const traceMetadata: Record<string, string> = {
[TraceMetadataKey.SCHEMA_VERSION]: '4',
};
const ctxMetadata = getConfiguredTraceMetadata();
if (ctxMetadata) {
Object.assign(traceMetadata, ctxMetadata);
}
const tags: Record<string, string> = {};
const ctxTags = getConfiguredTraceTags();
if (ctxTags) {View on GitHub (pinned to 6a27f2decc)
Solutions
- Pass a complete UC location to the exporter, e.g. new MlflowUcTableSpanExporter({ catalog: 'main', schema: 'ml', table: 'otel_spans' }).
- Log/inspect this._location at construction time and confirm all required UC parts are non-empty strings.
- Resolve the configuration before constructing the exporter (await env/config loading) rather than passing a placeholder object.
- Validate the location string renders correctly by calling getUcLocationString() yourself in a startup check.
Example fix
// before
const exporter = new MlflowUcTableSpanExporter({} as any);
// after
const exporter = new MlflowUcTableSpanExporter({ catalog: 'main', schema: 'monitoring', table: 'traces' }); Defensive patterns
Strategy: validation
Validate before calling
function assertUcLocation(loc: unknown): asserts loc is { catalog: string; schema: string; table: string } {
if (!loc || typeof loc !== 'object') throw new Error('UC location must be an object');
const l = loc as Record<string, unknown>;
for (const k of ['catalog', 'schema', 'table']) {
if (typeof l[k] !== 'string' || !(l[k] as string).length) throw new Error(`UC location missing '${k}'`);
}
}
assertUcLocation(location); // call before constructing the exporter Type guard
function isValidUcLocation(l: unknown): l is { catalog: string; schema: string; table: string } {
return !!l && typeof l === 'object' &&
['catalog', 'schema', 'table'].every(k => typeof (l as any)[k] === 'string' && (l as any)[k].length > 0);
} Prevention
- Validate the { catalog, schema, table } object before constructing MlflowUcTableSpanExporter.
- Load UC config (env/secret) fully before exporter construction.
- Add a startup smoke test calling getUcLocationString() with your location.
- Never pass `as any`/empty placeholder location objects.
When it happens
Trigger: onStart is called with a TraceLocation whose ucTablePrefix (catalog/schema/table parts) is empty, malformed, or of an unsupported shape, causing getUcLocationString() to return undefined/null.
Common situations: Configuring MlflowUcTableSpanExporter with an incomplete { catalog, schema, table } object (missing fields or empty strings); constructing the exporter before config/env that supplies the UC table name is loaded; passing a location object with wrong property names.
Related errors
- INVALID_PARAMETER_VALUE
- UC volume path must be provided to save, log or load SparkML
- {e.message}. If you are trying to use the Model Registry in
- INVALID_PARAMETER_VALUE
- BAD_REQUEST
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/91422a30bcb46056.
Report an issue: GitHub.