{"record":{"id":"6dd2b0669b3ce934","repo":"mastra-ai/mastra","slug":"observability-storage-get-service-names-not-implem","errorCode":"OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support service name discovery","messagePattern":"This storage provider does not support service name discovery","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"warning","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":535,"sourceCode":"    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({\n      id: 'OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support entity name discovery',\n    });\n  }\n\n  async getServiceNames(_args: GetServiceNamesArgs): Promise<GetServiceNamesResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support service name discovery',\n    });\n  }\n\n  async getEnvironments(_args: GetEnvironmentsArgs): Promise<GetEnvironmentsResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_ENVIRONMENTS_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support environment discovery',\n    });\n  }\n\n  async getTags(_args: GetTagsArgs): Promise<GetTagsResponse> {\n    throw new MastraError({","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L517-L553","documentation":"MastraError OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED. The base getServiceNames implementation always throws because service name discovery is an optional capability. Encountering it means the configured observability storage provider has not implemented enumerating service names from its telemetry data.","triggerScenarios":"Calling getServiceNames(args) on a storage instance using the base class default.","commonSituations":"Service-filter UIs against minimal adapters; deployments where telemetry storage points at a provider without metrics discovery; version upgrades adding new discovery methods not yet implemented in a custom adapter.","solutions":["Use a storage provider that implements service name discovery","Override getServiceNames to return distinct service names from your telemetry store","Catch and degrade gracefully (empty list or disabled filter)"],"exampleFix":"// before\nconst names = await storage.getServiceNames({});\n// after\nlet names = [];\ntry {\n  names = (await storage.getServiceNames({})).serviceNames ?? [];\n} catch (e) {\n  if (e.id !== 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED') throw e;\n}","handlingStrategy":"fallback","validationCode":"async function supportsServiceNames(storage) {\n  try { await storage.getServiceNames({}); return true; }\n  catch (e) { return e?.id === 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED' ? false : true; }\n}","typeGuard":"function isNotImplementedError(e: unknown): e is MastraError {\n  return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED';\n}","tryCatchPattern":"try {\n  const res = await storage.getServiceNames(args);\n} catch (e) {\n  if (isNotImplementedError(e)) return { serviceNames: [] };\n  throw e;\n}","preventionTips":["Confirm service name discovery support before wiring service filters","Maintain a capability registry for your storage instance","Prefer official providers with full observability implementations","Catch not-implemented errors explicitly instead of generic catch blocks"],"tags":["storage","observability","not-implemented","telemetry"],"backgroundTag":"storage-method-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}