Pairs with: Ingestion sources (the broader substrate that pull-mode lands events into) and CLI debugging (
langwatch ingest tail shows pulled events alongside pushed ones).Two universal adapters + reference implementations
Reference implementations using
http_polling ship for:
- Microsoft Copilot Studio: one-click admin enable, credentials only
- OpenAI compliance API: one-click admin enable, credentials only
- Anthropic compliance API: one-click admin enable, credentials only
How the framework works
IngestionSource.lastCursor in PG, persisted only after a successful
runOnce. If the worker crashes mid-run, the next run resumes from the
last persisted cursor (worst case = small re-pull window if the source
is at-least-once).
http_polling config shape
headerssupports template substitution:${{credentials.<key>}}pulls from the credential ref;${{ingestionSource.<field>}}pulls from the IngestionSource row (organizationId, name, etc.).cursorJsonPath+eventsJsonPathuse JSONPath to locate the next-page cursor + the events array in the response body.scheduleis a standard cron expression.eventMappingdeclares how to extract LangWatch’s normalized event shape from each event in the array.
s3_polling config shape
- Cursor = lexicographic-max key seen so far. New runs LIST the bucket
- prefix and only read keys lexicographically AFTER the cursor.
parser∈"ndjson" | "csv" | "json-array", applied per-file.- Credential rotation is honored on every run (no in-process caching).
Normalized event shape
Every adapter returns events in the same canonical shape, so the worker handoff to the trace-store ingest path doesn’t care which source produced them:Writing a custom puller (TypeScript module)
If neitherhttp_polling nor s3_polling fits your source, you can
ship a custom adapter:
Reference impl: Microsoft Copilot Studio
The Copilot Studio reference puller wrapshttp_polling with a
locked-down config matching Microsoft’s documented audit-log API
shape. Admins enable it at Settings → Governance → Ingestion
sources → Add → Microsoft Copilot Studio, enter their tenant
credentials, and the framework handles the rest. URL + auth shape are
fixed (only credentials are admin-editable).
The same one-click pattern applies for openai_compliance and
claude_compliance once those reference impls land alongside.
Where to next
- Ingestion sources: the broader substrate; push-mode and pull-mode both feed the same trace store
- CLI debugging:
langwatch ingest tailfor live inspection of pulled events - Compliance architecture — how pulled events flow through the unified observability substrate