Commit 864d0cb
committed
feat: add logCounter and logBatchCounter methods for usage metrics
- Introduced logCounter method to log individual usage counter metrics with upsert behavior.
- Added logBatchCounter method to log multiple usage counter metrics in batch, allowing for individual entries without aggregation.
- Updated logBatch method to accept a batch size parameter for better control over batch processing.
- Enhanced Usage class to support new logging methods and batch size functionality.
- Implemented tests for new methods, including scenarios for batch sizes, counter behavior, and metrics with tags.1 parent b6c260d commit 864d0cb
6 files changed
Lines changed: 874 additions & 159 deletions
File tree
- src/Usage
- Adapter
- tests/Usage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
0 commit comments