{"record":{"id":"93621745ef12d3ef","repo":"mastra-ai/mastra","slug":"observability-storage-get-label-values-not-impleme","errorCode":"OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support label value discovery","messagePattern":"This storage provider does not support label value discovery","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"warning","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":508,"sourceCode":"    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_METRIC_NAMES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support metric name discovery',\n    });\n  }\n\n  async getMetricLabelKeys(_args: GetMetricLabelKeysArgs): Promise<GetMetricLabelKeysResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_METRIC_LABEL_KEYS_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support metric label key discovery',\n    });\n  }\n\n  async getMetricLabelValues(_args: GetMetricLabelValuesArgs): Promise<GetMetricLabelValuesResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support label value discovery',\n    });\n  }\n\n  async getEntityTypes(_args: GetEntityTypesArgs): Promise<GetEntityTypesResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_ENTITY_TYPES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support entity type discovery',\n    });\n  }\n\n  async getEntityNames(_args: GetEntityNamesArgs): Promise<GetEntityNamesResponse> {\n    throw new MastraError({","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L490-L526","documentation":"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.","triggerScenarios":"Calling getMetricLabelValues(args) on a storage class that has not overridden the method.","commonSituations":"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.","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)"],"exampleFix":"// before\nconst values = await storage.getMetricLabelValues({ metricName, labelKey });\n// after\nlet values = [];\ntry {\n  values = (await storage.getMetricLabelValues({ metricName, labelKey })).labelValues ?? [];\n} catch (e) {\n  if (e.id !== 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED') throw e;\n}","handlingStrategy":"fallback","validationCode":"async function supportsLabelValues(storage) {\n  try { await storage.getMetricLabelValues({}); return true; }\n  catch (e) { return e?.id === 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED' ? false : true; }\n}","typeGuard":"function isNotImplementedError(e: unknown): e is MastraError {\n  return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED';\n}","tryCatchPattern":"try {\n  const res = await storage.getMetricLabelValues(args);\n} catch (e) {\n  if (isNotImplementedError(e)) return { labelValues: [] };\n  throw e;\n}","preventionTips":["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"],"tags":["storage","observability","not-implemented","metrics"],"backgroundTag":"storage-method-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}