mastra-ai/mastra · error · MastraError

OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED

OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED

Error message

This storage provider does not support score time series

What it means

getScoreTimeSeries returns scores bucketed into time intervals and requires provider-specific date-bucketing queries; the base class throws this by default. It indicates your storage adapter does not implement the time-series score capability.

Source

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

    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_SCORE_AGGREGATE_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support score aggregation',
    });
  }

  async getScoreBreakdown(_args: GetScoreBreakdownArgs): Promise<GetScoreBreakdownResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support score breakdown',
    });
  }

  async getScoreTimeSeries(_args: GetScoreTimeSeriesArgs): Promise<GetScoreTimeSeriesResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support score time series',
    });
  }

  async getScorePercentiles(_args: GetScorePercentilesArgs): Promise<GetScorePercentilesResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_SCORE_PERCENTILES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support score percentiles',
    });
  }

  // ============================================================================
  // Feedback

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Switch to a provider that implements score time series (libsql, postgres, upstash).
  2. Implement getScoreTimeSeries in your adapter using date-bucket aggregation.
  3. Catch the error and synthesize a series from listScores results client-side.
  4. Ensure the storage package version supports the time-series API.

Example fix

// before
const series = await storage.getScoreTimeSeries({ scope, timeRange, granularity: 'day' }); // throws
// after
try {
  const series = await storage.getScoreTimeSeries({ scope, timeRange, granularity: 'day' });
} catch (e) {
  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED') {
    return bucketClientSide(await storage.listScores({ scope, timeRange }), granularity);
  }
  throw e;
}
Defensive patterns

Strategy: fallback

Validate before calling

const supportsTimeSeries = storage.constructor.prototype.hasOwnProperty('getScoreTimeSeries');
if (!supportsTimeSeries) return bucketClientSide(scores, granularity);

Type guard

function hasTimeSeries(s: any): s is { getScoreTimeSeries: (a: any) => Promise<any> } {
  return typeof s?.getScoreTimeSeries === 'function' && s.constructor.prototype.hasOwnProperty('getScoreTimeSeries');
}

Try / catch

try {
  return await storage.getScoreTimeSeries(args);
} catch (e) {
  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED') {
    return bucketClientSide(await safeListScores(storage, { scope: args.scope, timeRange: args.timeRange }), args.granularity);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling storage.getScoreTimeSeries({ scope, timeRange, granularity }) on an adapter extending the base without an override, or from analytics/dashboard code hitting a minimal provider.

Common situations: Custom or in-memory storage adapters; trend charts in tooling; older third-party storage packages lacking newer observability methods.

Related errors


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