import type { ObservabilityReader } from './observability.js'; /** * The Cloudflare implementation of the observability seam (`observability.ts`) — * GraphQL invocation analytics + the Workers Observability telemetry query API, * mapped into the seam's neutral vocabulary (service ← scriptName, namespace ← * dispatchNamespaceName). Pure web-standard `fetch`, like the WfP uploader in * `wfp.ts`: no Cloudflare SDK, no node built-ins, so it runs in a Worker or in * node unchanged. The credential stays platform-held (D-34); callers only ever see * the narrowed JSON the seam returns. */ export interface CfObservabilityOptions { accountId: string; /** * A Cloudflare API token with Account Analytics read (the GraphQL invocations * dataset) and Workers Observability read (the telemetry query API). Deliberately * the same env slot as the WfP token in practice — one platform credential whose * permissions grow with the platform's needs — but nothing here assumes that. */ apiToken: string; /** * The Analytics Engine dataset the ROUTER writes its per-request datapoints into — * the only place the tenant dimension exists (§4.2), and therefore the only source * `tenantMetrics` can read. * * Stated by the caller and defaulted NOWHERE, for the reason `DISPATCH_NAMESPACE` * is (#962): the environments write to different datasets (`substrat_router` in * production, `substrat_router_test` on TEST — `apps/router/wrangler.jsonc`), a * code default is inherited silently by whichever environment forgets to override * it, and the failure is a TEST control plane answering questions about production * traffic. There is no error to notice: the query succeeds and the numbers are * somebody else's. * * Absent ⇒ `tenantMetrics` is not exposed at all, so the route answers 501 — the * platform's shape for an unconfigured capability — rather than a wrong number or * an empty array that reads as "your app served nothing". */ routerDataset?: string; } export declare function createCfObservabilityReader(opts: CfObservabilityOptions): ObservabilityReader; //# sourceMappingURL=cf-observability.d.ts.map