mastra-ai/mastra · warning · MastraError
OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED
OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED
Error message
This storage provider does not support label value discovery
What it means
MastraError OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED. The default getMetricLabelValues implementation in the observability storage base class always throws, because value discovery is an optional backend capability. Hitting it means the configured provider cannot enumerate label values for a metric.
Source
Thrown at packages/core/src/storage/domains/observability/base.ts:508
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_METRIC_NAMES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support metric name discovery',
});
}
async getMetricLabelKeys(_args: GetMetricLabelKeysArgs): Promise<GetMetricLabelKeysResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_METRIC_LABEL_KEYS_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support metric label key discovery',
});
}
async getMetricLabelValues(_args: GetMetricLabelValuesArgs): Promise<GetMetricLabelValuesResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support label value discovery',
});
}
async getEntityTypes(_args: GetEntityTypesArgs): Promise<GetEntityTypesResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_ENTITY_TYPES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support entity type discovery',
});
}
async getEntityNames(_args: GetEntityNamesArgs): Promise<GetEntityNamesResponse> {
throw new MastraError({View on GitHub (pinned to 75dd419e61)
Solutions
- Switch to a provider implementing label value discovery
- Override getMetricLabelValues in your storage class to query persisted label values
- Handle the error at the call site with a fallback (empty values, disabled filter dropdown)
Example fix
// before
const values = await storage.getMetricLabelValues({ metricName, labelKey });
// after
let values = [];
try {
values = (await storage.getMetricLabelValues({ metricName, labelKey })).labelValues ?? [];
} catch (e) {
if (e.id !== 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED') throw e;
} Defensive patterns
Strategy: fallback
Validate before calling
async function supportsLabelValues(storage) {
try { await storage.getMetricLabelValues({}); return true; }
catch (e) { return e?.id === 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED' ? false : true; }
} Type guard
function isNotImplementedError(e: unknown): e is MastraError {
return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED';
} Try / catch
try {
const res = await storage.getMetricLabelValues(args);
} catch (e) {
if (isNotImplementedError(e)) return { labelValues: [] };
throw e;
} Prevention
- Confirm label value discovery support before building filter UIs on it
- Gate drill-down features behind a one-time capability check
- Keep custom adapters updated when the observability storage interface grows
- Log a warning (not a crash) when this capability is missing
When it happens
Trigger: Calling getMetricLabelValues(args) on a storage class that has not overridden the method.
Common situations: Storage adapters lacking observability support; misconfigured storage where a non-metrics backend is registered as the observability store; drill-down UIs querying label values against unsupported providers.
Related errors
- OBSERVABILITY_STORAGE_BATCH_CREATE_METRICS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_LIST_METRICS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_METRIC_AGGREGATE_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_METRIC_BREAKDOWN_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_METRIC_TIME_SERIES_NOT_IMPLEMENTED
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/93621745ef12d3ef.
Report an issue: GitHub.