{"record":{"id":"20f9fba707e7908c","repo":"mastra-ai/mastra","slug":"observability-delta-polling-not-supported","errorCode":"OBSERVABILITY_DELTA_POLLING_NOT_SUPPORTED","errorMessage":"This storage provider does not support observability delta polling","messagePattern":"This storage provider does not support observability delta polling","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/storage/domains/observability/inmemory.ts","lineNumber":166,"sourceCode":"    this.db.observabilityNextCursorId = 1;\n    this.db.traceCursorIds.clear();\n    this.db.branchCursorIds.clear();\n    this.db.metricCursorIds.clear();\n    this.db.logCursorIds.clear();\n    this.db.scoreCursorIds.clear();\n    this.db.feedbackCursorIds.clear();\n  }\n\n  private deltaPollingFeatureEnabled(): boolean {\n    return coreFeatures.has(OBSERVABILITY_DELTA_POLLING_FEATURE);\n  }\n\n  private assertDeltaPollingEnabled(): void {\n    if (this.deltaPollingFeatureEnabled()) {\n      return;\n    }\n\n    throw new MastraError({\n      id: 'OBSERVABILITY_DELTA_POLLING_NOT_SUPPORTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support observability delta polling',\n    });\n  }\n\n  private allocateObservabilityCursorId(): number {\n    const cursorId = this.db.observabilityNextCursorId;\n    this.db.observabilityNextCursorId += 1;\n    return cursorId;\n  }\n\n  /**\n   * Upserts a record into an append-only collection keyed by an id field.\n   *\n   * If an existing record with the same id is found, it is replaced in place\n   * (preserving its cursor id so delta polling does not re-emit it). Otherwise","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/inmemory.ts#L148-L184","documentation":"ObservabilityInMemory supports delta polling (incremental reads via cursors) only when the corresponding feature flag is enabled. assertDeltaPollingEnabled() throws this error from listTraces, listBranches, listMetrics, listLogs, listScores, and listFeedback when the flag is off, i.e. the in-memory provider cannot serve delta/incremental queries in that configuration.","triggerScenarios":"Calling any of listTraces/listBranches/listMetrics/listLogs/listScores/listFeedback on ObservabilityInMemory while deltaPollingFeatureEnabled() returns false (flag not set / not configured).","commonSituations":"Running local dev with the in-memory store while a client (e.g. Studio or a poller) requests delta-polling reads; forgetting to enable the delta-polling feature flag in the storage constructor or environment; mixing an in-memory store into an environment designed for DB-backed delta polling.","solutions":["Enable the delta polling feature flag for ObservabilityInMemory (constructor option/env flag it checks via deltaPollingFeatureEnabled()).","Switch to a persistent storage provider that supports delta polling for observability.","Change the client to use full-list queries instead of cursor/delta-based reads when using the in-memory store.","Verify you are instantiating ObservabilityInMemory deliberately rather than as an accidental default storage."],"exampleFix":"// before\nconst storage = new ObservabilityInMemory(); // delta polling off\nconst { traces } = await storage.listTraces({ ... }); // throws\n\n// after\nconst storage = new ObservabilityInMemory({ deltaPolling: true }); // enable flag\nconst { traces } = await storage.listTraces({ ... });","handlingStrategy":"try-catch","validationCode":"if (storage instanceof ObservabilityInMemory && !isDeltaPollingEnabled(storage)) { useFullListPath(); }","typeGuard":"function supportsDeltaPolling(s: unknown): boolean {\n  return !(s instanceof ObservabilityInMemory) || isDeltaPollingEnabled(s);\n}","tryCatchPattern":"try {\n  page = await storage.listTraces(args);\n} catch (e) {\n  if ((e as MastraError).id === 'OBSERVABILITY_DELTA_POLLING_NOT_SUPPORTED') {\n    page = await fullListTraces(args); // fallback to non-delta read\n  } else throw e;\n}","preventionTips":["Enable the delta-polling feature flag when constructing ObservabilityInMemory if pollers depend on it.","Use a persistent provider for production observability reads.","Document flag requirements wherever in-memory storage is used in dev/test setups.","Assert the storage capability in startup smoke checks."],"tags":["storage","observability","in-memory","feature-flag","delta-polling"],"backgroundTag":"feature-flag-disabled","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}