Instrumentation
Overview
Pay-i instrumentation captures your GenAI provider calls and sends cost, token, and latency telemetry to Pay-i. Call payi_instrument() once at application startup. Then use @track or track_context() to add scoped metadata such as use cases, users, and limits.
| Function | Purpose |
|---|---|
payi_instrument() | Initialize instrumentation at startup and set global defaults |
@track | Annotate a function with metadata such as use_case_name and limit_ids |
track_context() | Annotate a block of code with runtime values such as user_id and use_case_step |
Updated 20 days ago
Did this page help you?
