Audit coverage
Run this after either of the other two passes, or on a repository someone else instrumented. The failure mode it hunts is silent: an uncaptured call does not error, it does not warn, it simply never appears in the dashboard. A missing route shows up as a gap you can see. A missing client shows up as nothing at all.
Both prompts are read-only. They change no code and produce a ranked list.
Python
Section titled “Python”Audit this Python repository's Metergraph instrumentation. Report only;change nothing.
Find every path that reaches a model provider and say whether it iscaptured:
1. OpenAI(), AsyncOpenAI(), Anthropic(), AsyncAnthropic() or genai.Client() constructed but never passed through metergraph.wrap(), or wrapped with the result discarded. 2. Raw HTTP calls with requests, httpx or aiohttp to api.openai.com, api.anthropic.com, generativelanguage.googleapis.com or a gateway URL. 3. Calls made in a subprocess, Celery worker, notebook or cron entrypoint that never runs the setup path. 4. Short-lived entrypoints that exit without metergraph.shutdown(), so queued telemetry may be lost and background work is not stopped. 5. Work handed to a ThreadPoolExecutor that was not passed through metergraph.wrap_executor(), which loses the route, trace, session and tags. 6. Any environment or deployment target where the SDK's app token is not set, since capture there is off and silent. The exact variable name and every other setting are at https://www.metergraph.dev/docs/reference/configuration/ 7. Calls inside a route() or trace() block that were left with content capture disabled when they did not need to be. What the controls do is at https://www.metergraph.dev/docs/guides/keep-content-private/
For each finding give the file, the line, and which of the seven it is.Rank by how much traffic it likely represents. Do not fix anything yet.TypeScript
Section titled “TypeScript”Audit this TypeScript repository's Metergraph instrumentation. Reportonly; change nothing.
Find every path that reaches a model provider and say whether it iscaptured:
1. new OpenAI(), new Anthropic() or new GoogleGenAI() constructed but never passed through mg.wrap(), or wrapped with the result discarded. 2. Vercel AI SDK models used without mg.vercelAISDKMiddleware() in wrapLanguageModel. 3. Functions calling a wrapped client without mg.track("name", fn). These will report unstable, bundler-generated names in production even though they look fine in development. Flag every one. 4. Raw fetch calls to api.openai.com, api.anthropic.com, generativelanguage.googleapis.com or a gateway URL. 5. Serverless handlers (Lambda, Workers, Vercel) that return without mg.wrapHandler, mg.bindWaitUntil or an awaited mg.flush(), so the queue is frozen or discarded before delivery. The rule per runtime is at https://www.metergraph.dev/docs/instrument/serverless/ 6. Any environment or deployment target where the SDK's app token is not set, since capture there is off and silent. The exact variable name and every other setting are at https://www.metergraph.dev/docs/reference/configuration/ 7. Edge or worker bundles where the SDK is imported but the setup path never runs.
For each finding give the file, the line, and which of the seven it is.Rank by how much traffic it likely represents. Do not fix anything yet.Reading the result
Section titled “Reading the result”The seven categories are not equally urgent. In rough order of how much traffic they usually hide:
| Finding | Why it matters |
|---|---|
| A deployment target with no token | Every call from that environment is invisible, and there is no error to notice |
| A client constructed but never wrapped | A whole call site, permanently missing |
| A raw HTTP call to a provider | The SDK cannot see it at all. Move it onto a client, or send rows yourself |
| A worker or subprocess with its own entrypoint | Often the largest single share of spend in a batch-heavy codebase |
A short-lived process with no shutdown() | Rows are produced and then dropped on exit |
| Executor work with no context propagation | Rows arrive, but with no route, trace, session or tags |
| An unwrapped function in TypeScript | Rows arrive under a name a bundler invented, which changes on the next build |
For a raw HTTP call you cannot route through a client, Write your own client covers sending rows to the ingest API directly. For the propagation cases, see Attribution across threads and Serverless and short-lived jobs.
Instrument a repository The full pass, if the audit found more missing than present.