Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/evaluation-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vercel/flags-core': minor
---

Add aggregated flag evaluation telemetry and a `clientName` option for the Vercel Flags client.
3 changes: 2 additions & 1 deletion packages/vercel-flags-core/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ The Controller tags all data with its origin using `tagData(data, origin)` from

### Usage Tracking

- Batches flag read events (max 50 events, max 5s wait)
- Batches flag read/evaluation events; flushes on any of: 50 distinct events, a 5s idle window (reset on every event), or a 60s max window (starts with the batch, never reset)
- The scheduled flush awaits the full ingest send (incl. retries) before its `waitUntil` promise resolves; `shutdown()` drains any in-flight batch instead of orphaning it
- Sends to `flags.vercel.com/v1/ingest`
- At runtime: deduplicates by request context (per-instance WeakSet in UsageTracker)
- During builds: deduplicates all reads to a single event (buildReadTracked flag in Controller), since there is no request context available
Expand Down
Loading
Loading