reportUsage or report_usage.
Integration matrix
What Pylva captures
Pylva captures cost-shaped metadata:- Provider and model.
- Token counts when the provider or framework exposes them.
- Latency and status.
customer_idandstep_name.- Metric and metric value for non-LLM usage.
Which path should I use?
Use auto-instrumentation when your runtime calls a supported provider client directly. Use the callback path when LangGraph or LangChain owns the model call. UsereportUsage or report_usage when the cost comes from a custom tool, non-LLM service, or unsupported provider path.
Avoid double counting
Use one capture path for the same model call.- Do not use provider auto-instrumentation and a framework callback for the same call.
- Do not manually report a provider call that the SDK already captures.
- Manually report only usage that is not already captured.