Documentation

Observe

  • Tracing and exports

Language models

Observe
View .mdOpenAPI

Tracing and exports

Every step of every job is recorded as OpenTelemetry-shaped spans and events, and is yours: in the job's log, as downloads, and, if you like, sent as it happens to your own tools.

Status. Traces have been live since 2026-10-08; content logging, the trace viewer and canonical Weights names are included in the implementation reviewed on 2026-10-10. Tracing and tracking is free today: its fee per job is $0.00.

Which record answers what

Four records describe work on this service. They share identifiers, not a format.

You askReadWhat it holds
What did this job do, step by step?Job traces: GET /v1/jobs/{job_id}/logs, GET /v1/traces, your own destinationsThe spans and events of one job_id: each call to the model, each wait and each move.
Where is my queued plan, and what did it deliver?ComputePlan events and the plan's receipt: GET /v1/compute/events, GET /v1/compute/plans/{plan_id}The lifecycle of one plan_id, its stages and packs: admitted, waiting, leased, completed, failed; and the receipt's outcome, coverage and accounting.
What was I charged for one request?Usage receipts: GET /v1/usage with ?schema=weights.receipts/v1One receipt per settled request, by request_id: the units billed and the amount. Without schema, your balance and totals.
What is the whole service doing right now?Snapshot v1The operator's record, not a customer one: it takes an operator's token and has its own description, apart from this reference.

What is recorded

A job is one trace, rooted in a span named job that runs from its creation until no page is open. Under it:

  • a span named node.call for each call to the model that carried its pages, with the pages, the time and the outcome (the names are the service's own and stay as they are);
  • the events job.queued, job.cold_start (the model was not ready, with the expected wait), job.waiting_for_credit, job.waiting_for_token_daily_cap (a training job at its token's cap, merged 2026-10-09) and job.cancelled;
  • endpoint.interrupted and endpoint.resumed around a move to new hardware;
  • for a training job, a node.train span per run and the events training.started, training.checkpoint, training.moving, training.resumed and training.done or training.failed.

Your account has its own trace for credit (billing.grant, billing.topup), charges (billing.charge, billing.option), datasets (dataset.ready) and requests to make the model ready (model.wake_requested). Spans carry counts, times, identifiers and codes. Page text and dataset rows never appear. A page's result goes only where you ask for it: to a destination with "include outputs" on, and to the job log with ?outputs=1.

Use X-Weights- headers, Weights-Notice and weights.* trace fields. OTLP identifies this service as weights.fyi, with scope weights.telemetry.

The job log and downloads

GET /v1/jobs/{job_id}/logs lists one job's spans and events in order:

sh
curl -s https://weights.fyi/run/v1/jobs/JOB_ID/logs -H "Authorization: Bearer $WEIGHTS_API_KEY"

Three downloads stream your records as files, without the Tracing and tracking option: a page job's results as NDJSON (results.ndjson), every credit and charge as CSV (usage.csv), and your spans for a period as one OpenTelemetry JSON request, at most 512 spans an answer with X-Weights-Next-After for the rest (GET /v1/traces):

sh
curl -s "https://weights.fyi/run/v1/traces?from=2026-10-08T00:00:00Z&to=2026-10-09T00:00:00Z" \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -D headers.txt -o traces.json

Your own destinations

A destination receives your spans as they end. Add one on your panel (/app, Tracing) or with POST /v1/trace-sinks. It sends only while the option Tracing and tracking is on, which you switch on your panel; while off, destinations are kept but paused, and one added then starts paused.

KindWhat is sent
otlp_http (the default)OpenTelemetry over HTTP, in the JSON encoding, posted to your address with /v1/traces added, with the headers you gave.
mlflowThe same, to an MLflow tracking server's trace intake at your address with /v1/traces added; the header x-mlflow-experiment-id is required.
webhookJSON lines, posted to your address as given and signed (below): one span a line, and the compute events of every plan that names it in notify.

The address is https, every address it resolves to must be public, checked again at each delivery, and redirects are not followed. Header values are secret: used, never shown back. A destination gets the spans that end after you add it. No span is dropped while your end is down: delivery is retried from 1 s up to 64 s apart, and the panel shows what waits and the last error. An account has at most 6 destinations. Test one before you rely on it. A confidential workspace cannot add a destination: the call answers 400 invalid_preferences.

Checking a webhook's signature

The signing secret, fabwh_…, is shown once. Each delivery carries X-Weights-Timestamp (Unix seconds) and X-Weights-Signature: sha256=<hex>, the HMAC-SHA256 of the timestamp, a dot and the raw body; the timestamp lets you refuse replays:

python
import hashlib, hmac

def genuine(secret: str, timestamp: str, body: bytes, signature: str) -> bool:
    expected = hmac.new(secret.encode(), timestamp.encode() + b"." + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest("sha256=" + expected, signature)

# The same check in the Python SDK: the delivery's lines, or WebhookRefused naming why not.
from weights.sdk import compute_events, verify_webhook
lines = verify_webhook(secret, headers, body, max_age_seconds=MAX_AGE_SECONDS)

Compute events on a webhook

A ComputePlan naming a webhook in notify pushes its events there, signed alike, one line each:

json
{"type": "compute_event", "schema": "weights.compute-event/v1", "event_id": "compute-event-4182", "seq": 4182, "emitted_at_ms": 1795161600000, "event": "pack_completed", "account_id": 12, "tenant_id": "tenant_12", "org_slug": "acme", "container_id": null, "plan_id": "waves-2026-11-20", "stage_id": "pages", "pack_id": "wave-0", "ordinal": 0, "data": {"output_uri": "r2://tenants/tenant_12/results/waves/plans/waves-2026-11-20/stages/pages/index-00000.jsonl.zst", "output_sha256": "9f2c41d07a5be3c8a6f1e0d2b4c7a9e8f3d6b1a0c5e4f7d2a9b8c3e6f1a0d4b7", "items_completed": 500}}
FieldHolds
Subscribe"notify": {"sink_id": ID, "events": []} on POST /v1/compute/plans, or notify_sink_id in the SDK; [] is every public event. From a shell, weights sinks create URL --pipe adds the destination and pipes its id and secret to your receiver as one JSON line.
type, schemacompute_event and weights.compute-event/v1; a span line is type: "span".
event_id, seqOne id per event. Delivery is at least once and oldest first, so key on event_id.
eventplan_admitted, pack_completed, stage_completed, plan_completed and the other public plan events of GET /v1/compute/events; notify.events narrows them.
plan_id, stage_id, pack_id, ordinalWhat the event is about; pack_id and ordinal on pack events only.
dataThe event's public fields: a pack's output_uri, output_sha256 and items_completed; a stage's or a plan's outcome and coverage.

Logging inputs and outputs

Two switches, off by default and independent, keep copies of what new jobs were given and what they answered, so you can debug a page that was classified oddly; turning one off also stops copies for running jobs, and training rows are never copied. Copies are kept seven days, at most 16 KiB an entry (larger ones as a marked preview) and 16 MiB an account. Deleting them removes every stored copy, not your results, datasets, or copies already sent to your tools. Use PUT /v1/trace-preferences, GET /v1/jobs/{job_id}/trace-content and DELETE /v1/trace-content, or the panel, which includes a viewer for your own traces. A destination with "include outputs" on, and the job log with ?outputs=1, get a bounded sample on the job span; GET /v1/traces stays content-free, and our own traces never receive it. A confidential workspace must keep both switches off: turning one on answers 400 invalid_preferences. The switches govern content only; spans, usage and receipts are kept either way.

Join your own trace

Send a W3C traceparent with POST /v1/classify, POST /v1/jobs or POST /v1/endpoint/warm, and the job lands under your span; the answer carries the job's own traceparent. An unusable one is ignored, with Weights-Notice: traceparent_ignored:

sh
curl -s -i https://weights.fyi/run/v1/classify \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -H "traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" \
  -d '{"model": "laya-page-role", "pages": ["First page text"]}'