Skip to content
20 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.1/**
2 * Each project's store as a Durable Object: the logic is ./store.ts's
3 * `Store`, whose methods are copied onto the object's (and so are
4 * callable over RPC; ./index.ts types the stub as a `Store`).
5 */
6import { DurableObject } from "cloudflare:workers";
7
8import { Store } from "./store.ts";
9
10export class TelemetryStore extends DurableObject {
11 constructor(ctx: DurableObjectState, env: unknown) {
12 super(ctx, env as never);
13 ctx.blockConcurrencyWhile(async () => Store.prototype.open.call(this, ctx));
14 }
15}
16
17for (const name of Object.getOwnPropertyNames(Store.prototype)) {
18 if (name === "constructor") continue;
19 Object.defineProperty(TelemetryStore.prototype, name, Object.getOwnPropertyDescriptor(Store.prototype, name)!);
20}