Metadata and Custom Properties
How to add custom properties / metadata to usage tracking
Sometimes you want to track extra custom properties or metadata that you'll need. For example, you might want to store tracking IDs or you want to track more context.
To do this, you'll send a customProperties
field in the POST body to the trackUsage
API.
Then, when you're in the dashboard, you can filter by any of these custom properties!
Here's an example in Javascript with the manual tracking SDK:
Here's an example in Python with the OpenAI wrapper:
Last updated