forked from colbymchenry/codegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
30 lines (26 loc) · 1.17 KB
/
Copy pathwrangler.jsonc
File metadata and controls
30 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// codegraph telemetry ingest — see README.md and docs/design/telemetry.md.
// Secrets are NOT configured here: POSTHOG_KEY is set via `wrangler secret put POSTHOG_KEY`.
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "codegraph-telemetry",
"main": "src/index.ts",
"compatibility_date": "2026-06-12",
"compatibility_flags": ["nodejs_compat"],
// First-party endpoint. The custom domain auto-provisions DNS + cert when the
// getcodegraph.com zone is on the deploying account. workers.dev stays off so
// the only public surface is the documented one.
"routes": [{ "pattern": "telemetry.getcodegraph.com", "custom_domain": true }],
"workers_dev": false,
"observability": { "enabled": true, "head_sampling_rate": 1 },
// Non-secret config. Swap host here if the backend ever moves (EU, self-hosted…).
"vars": { "POSTHOG_HOST": "https://us.i.posthog.com" },
// Per-machine_id rate limit. Legit clients flush a handful of times per day;
// 6/min absorbs install+index bursts while capping abuse.
"ratelimits": [
{
"name": "MACHINE_RATE_LIMITER",
"namespace_id": "1001",
"simple": { "limit": 6, "period": 60 }
}
]
}