@glassray/tracing. Point your exporter at the OTLP endpoint:
The delivery contract: whole trace per request
This is the one thing raw-OTel users must know. Glassray’s ingest replaces, not merges, per trace ID: within one request, spans are grouped bytraceId into one document per trace (multiple traces per request are fine) — but across requests, the latest push of a trace ID overwrites the previous one.
That interacts badly with the default OTel export strategies:
The fix: force-flush per run
Make each run’s spans ship together by forcing a flush when the run’s root span ends:batch processor — one run’s spans must leave in one export. If your runs are short-lived processes (a CLI, a job), flushing on process exit is enough.
This is exactly the contract
@glassray/tracing automates: it buffers each run and POSTs once when the root settles. If you’re not already invested in OTel, the SDK is the path with no caveats. Server-side span merging (which would lift this contract for arbitrary collectors) is on the roadmap, not available today.Attributes Glassray reads
Standard vocabularies light up automatically:gen_ai.* (operation, model, provider, token usage, gen_ai.input.messages / gen_ai.output.messages, plus the older indexed gen_ai.prompt.{i}.* / gen_ai.completion.{i}.* family) and OpenInference’s generic input.value / output.value. Support for other vendor-specific content attributes (Vercel AI SDK ai.*, OpenInference’s indexed llm.* messages, Traceloop) is still expanding — with those instrumentations, structure/model/tokens land today and content coverage depends on which of the attributes above they emit. Trace-level input/output is read from the root span’s content attributes, and session.id groups conversation turns. To carry Glassray’s metadata convention, set glassray.customer / glassray.agent / glassray.flow as resource attributes (root-span attributes override). The former glassray.environment / deployment.environment.name dimension is retired — the ingest key selects the project, so both attributes are ignored.