mastra-ai/mastra · warning · MastraError

OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED

OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED

Error message

This storage provider does not support entity name discovery

What it means

MastraError OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED. getEntityNames in the observability storage base class is a stub that always throws, so providers that do not implement entity name discovery surface this error. It means the backend cannot list entity names (specific agent/workflow identifiers) recorded in telemetry.

Source

Thrown at packages/core/src/storage/domains/observability/base.ts:526

    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({
      id: 'OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support entity name discovery',
    });
  }

  async getServiceNames(_args: GetServiceNamesArgs): Promise<GetServiceNamesResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support service name discovery',
    });
  }

  async getEnvironments(_args: GetEnvironmentsArgs): Promise<GetEnvironmentsResponse> {
    throw new MastraError({

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Switch to a provider implementing entity name discovery
  2. Override getEntityNames in your storage domain to query distinct entity names
  3. Catch the error and fall back to empty/manual filters

Example fix

// before
const names = await storage.getEntityNames({ entityType: 'agent' });
// after
let names = [];
try {
  names = (await storage.getEntityNames({ entityType: 'agent' })).entityNames ?? [];
} catch (e) {
  if (e.id !== 'OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED') throw e;
}
Defensive patterns

Strategy: fallback

Validate before calling

async function supportsEntityNames(storage) {
  try { await storage.getEntityNames({}); return true; }
  catch (e) { return e?.id === 'OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED' ? false : true; }
}

Type guard

function isNotImplementedError(e: unknown): e is MastraError {
  return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED';
}

Try / catch

try {
  const res = await storage.getEntityNames(args);
} catch (e) {
  if (isNotImplementedError(e)) return { entityNames: [] };
  throw e;
}

Prevention

When it happens

Trigger: Calling getEntityNames(args) on a storage class that relies on the base stub.

Common situations: Filter dropdowns in observability dashboards against unsupported storage; custom adapters migrating from older MastraStorage interfaces; using scores-only or traces-only backends for full metric exploration.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/309553a8b883fdbd. Report an issue: GitHub.