mastra-ai/mastra · warning · MastraError
OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED
OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED
Error message
This storage provider does not support service name discovery
What it means
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.
Source
Thrown at packages/core/src/storage/domains/observability/base.ts:535
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({
id: 'OBSERVABILITY_STORAGE_GET_ENVIRONMENTS_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support environment discovery',
});
}
async getTags(_args: GetTagsArgs): Promise<GetTagsResponse> {
throw new MastraError({View on GitHub (pinned to 75dd419e61)
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)
Example fix
// before
const names = await storage.getServiceNames({});
// after
let names = [];
try {
names = (await storage.getServiceNames({})).serviceNames ?? [];
} catch (e) {
if (e.id !== 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED') throw e;
} Defensive patterns
Strategy: fallback
Validate before calling
async function supportsServiceNames(storage) {
try { await storage.getServiceNames({}); return true; }
catch (e) { return e?.id === 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED' ? false : true; }
} Type guard
function isNotImplementedError(e: unknown): e is MastraError {
return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED';
} Try / catch
try {
const res = await storage.getServiceNames(args);
} catch (e) {
if (isNotImplementedError(e)) return { serviceNames: [] };
throw e;
} Prevention
- 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
When it happens
Trigger: Calling getServiceNames(args) on a storage instance using the base class default.
Common situations: 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.
Related errors
- OBSERVABILITY_STORAGE_GET_ENTITY_TYPES_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_ENVIRONMENTS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_TAGS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_BATCH_UPDATE_SPANS_NOT_IMPLEMENTED
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/6dd2b0669b3ce934.
Report an issue: GitHub.