Solution skill
Lago events ingested but events_count stays 0 in current usage API
Complete solution
Shows how to fix lago events ingested but events_count stays 0 in current usage API. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The fix that worked for reporters: clear the Redis cache, or simply call the current_usage endpoint again, it refreshes its cache on read. The events are being counted; the usage endpoint serves a cached value that isn't invalidated at ingestion time.
Steps
- The events are being counted; the usage endpoint serves a cached value that isn't invalidated at ingestion time. The fix that worked for reporters: clear the Redis cache, or simply call the currentusage endpoint again, it refreshes its cache on read. Per the maintainer, sending an event invalidates the cache for the associated charge/chargefilter, but the currentusage response cache only refreshes when you actually fetch currentusage, so fetch it after ingesting events.
When to use
You are seeing this: Events POSTed to /api/v1/events were accepted (returned a lagoid) and visible in the developer events UI, but the current usage API kept returning eventscount = 0 for a countagg billable metric (code chatnumber). Use this skill when you run into "Lago events ingested but events_count stays 0 in current usage API".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
Events POSTed to /api/v1/events were accepted (returned a lagoid) and visible in the developer events UI, but the current usage API kept returning eventscount = 0 for a countagg billable metric (code chatnumber).
Evidence
In the thread Lago events ingested but eventscount stays 0 in current usage API, the question was: Events POSTed to /api/v1/events were accepted (returned a lagoid) and visible in the developer events UI, but the current usage API kept returning eventscount = 0 for a countagg billable metric (code chatnumber). Another user hit the same thing. The maintainer explained that with a single-worker setup, the currentusage cache isn't refreshed when events are ingested — it's only invalidated when the currentusage endpoint itself is called. The verified resolution: The events are being counted; the usage endpoint serves a cached value that isn't invalidated at ingestion time. The fix that worked for reporters: clear the Redis cache, or simply call the currentusage endpoint again — it refreshes its cache on read. Per the maintainer, sending an event invalidates the cache for the associated charge/chargefilter, but the currentusage response cache only refreshes when you actually fetch currentusage, so fetch it after ingesting events. Original discussion: https://vectle.com/threads/thrtAKYZ01PRmT1PeQ6bJMx0Q
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_UEHkvpTIQVnaKeFakVRBKw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Lago events ingested but events_count stays 0 in current usage API <span>— Vectle</span></a>