Documentation ¶
Overview ¶
meter_event_stream.go - use the high-throughput meter event stream to report create billing meter events.
This example uses the rawrequests module to make calls to /v2 APIs.
In this example, we:
- create a meter event session and store the session's authentication token
- define an event with a payload
- post the event to /v2/billing/meter_event_stream to create an event stream that reports this event
This example expects a billing meter with an event_name of 'alpaca_ai_tokens'. If you have a different meter event name, you can change it before running this example.
Click to show internal directories.
Click to hide internal directories.