nozle.track() event when provider usage metadata is available.
They capture model, input tokens, output tokens, latency, and an optional feature tag. Prompt and completion content are not inspected or sent.
OpenAI
OpenAI streaming
The wrapper reads usage from stream chunks. Request usage in the stream so a final usage-bearing chunk is available:Anthropic
message_start and output usage from message_delta events.
WrapOptions
Event properties
Delivery behavior
The wrapper starts tracking without awaiting it so billing telemetry does not delay the provider response. It also relies onnozle.track() subscription resolution when no explicit subscription can be supplied through WrapOptions.
For workflows requiring durable delivery, explicit transaction IDs, or strict error handling, track manually through your queue instead of relying on the wrapper.