FDE Times dataFDE jobs open 932▼14 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 62Companies hiring 202Remote-friendly 24%Median US pay $201kTop hirer Databricks 92
中文VI

The newspaper of the Forward Deployed Engineer

Tools

OpenMeter caps tokens per customer at the cost of three more systems

Self-hosted releases are still labelled beta, so ask who answers the 2am page when ClickHouse fills its disk before drawing the architecture.

ShareLinkedInFacebookX

In brief

  • OpenMeter meters tokens, offers per-customer limits your application enforces itself, and underpins billing, but self-hosting means adding Kafka, ClickHouse and PostgreSQL
  • Accurate numbers depend on every event having a unique id that stays the same on resend; the request ID is the natural choice
  • Releases are still beta, the Helm chart is meant for development only, and balances can lag by a few seconds
Two horizontal bars compare ways of setting the ID when an event is resent. If each send creates a new UUID, both the first attempt and the resend are counted, for a total of 2,400 tokens. If the request ID is used as the id, the resend is discarded and the total stays at 1,200 tokens.
OpenMeter deduplicates events by the id and source pair, so the ID must stay the same on resending. Source: illustrative example from the article, based on OpenMeter documentation.

The README for OpenMeter, the open-source tool in the openmeterio/openmeter repository, reduces its purpose to four jobs: metering usage, controlling access, billing customers and keeping the infrastructure in your hands.

The first two go straight to a question every FDE deploying an LLM application for multiple customers eventually faces: how many tokens has customer A used, and when should they be cut off?

OpenMeter answers both in a single system. Kong acquired OpenMeter on September 3, 2025 and committed to keeping the project open source under the Apache 2.0 license.

The price is a fairly heavy data stack to operate, running on software whose releases are still labeled beta. Understanding both costs before recommending it to a client will spare you most of the trouble later.

When to use it, and when to wait

OpenMeter fits one case best: an AI platform serving many tenants, each with its own token allowance, where usage data must stay on the client’s infrastructure. A self-hosted core consists of OpenMeter’s two processes, the API and the worker, running alongside Kafka, ClickHouse and PostgreSQL.

That list is the first filter. If the client’s operations team has never run Kafka or ClickHouse, you are proposing three more systems for them to be on call for. In customer discovery, ask directly who will answer the phone at 2am when ClickHouse runs out of disk, and only then draw the architecture.

A minimal token meter

The official guide for AI tokens is short: define the meter with a SUM aggregation and send the token count in the tokens property of the event data.

Because each model is priced differently, the documentation recommends adding the prompt’s provider, model and type to the group-by. At the end of the month you can then separate input and output tokens for each model and multiply them by the matching unit price.

The ID is where things go wrong. OpenMeter deduplicates events on the pair of id and source, so the ID must be unique and must stay the same when an event is resent. Below is a sketch of the fields that matter, not the full schema:

id:     <request ID of the LLM call>
source: <name of the service sending the event>
data:   tokens, provider, model, type

Take a gateway that calls a model and gets back 1,200 tokens. It sends the event, times out and sends it again. If each attempt generates a fresh UUID, the customer is billed for 2,400 tokens.

If the request ID is used as the id, the second send is discarded and the count stays at 1,200. This is an error the client will spot on their own when they reconcile against the provider’s invoice.

Hard limits are not absolute

To limit each customer’s usage, OpenMeter uses metered entitlements. The allowance lives in grants. Each grant is a record that gives a specific customer an amount of usage, and it can be configured with a priority, an expiry date, rollover of the balance into the next period and automatic recurrence.

In the quickstart example, setting isSoftLimit: false means the customer is denied access once the balance reaches zero.

OpenMeter does not block requests for you. The API returns the entitlement value with a required hasAccess field, and your own application must read that field to let the request through or stop it. Enforcement therefore still sits in the gateway code you write.

The entitlement documentation describes the current value as real time. Yet a post on the OpenMeter blog by Lior Mechlovich says the balance can take a few seconds to reflect the latest events. For a tenant firing hundreds of parallel calls, those few seconds are enough to go slightly over the limit.

In practice, tell the client plainly that limits carry a small margin of error, and keep a buffer below the cutoff. If the client’s contract demands token-exact enforcement, you need an additional local counter at the gateway.

What to tell the client up front

The README states openly that releases are still beta and may contain breaking changes. The official Helm chart for Kubernetes is written for development environments, not production.

The release notes also carry a line anyone self-hosting should record: when upgrading, do not skip v1.0.0-beta.240. That release came out on November 27, and the latest, beta.241, on November 29, 2026. Pin your versions, keep a staging environment and read the release notes before every upgrade.

None of this makes OpenMeter useless. It simply means the production Kubernetes manifests will be written, and owned, by you or the client. Put that in the handover documentation in the first week rather than letting the client discover it once they are already running it.

What to learn first

Before touching OpenMeter, get solid on three things: idempotency in event pipelines, Kafka’s at-least-once message delivery, and how ClickHouse aggregates figures. When a client asks why two numbers disagree, those are the places you will have to look.

If you have done this kind of work, put it on your CV in concrete technical terms rather than a generic keyword. A line such as “built per-tenant token metering, with events made idempotent by request ID and access blocked by quota” shows an interviewer that you understand both the data and the client’s money.

In the end, a wrong token count shows up on the client’s invoice before it shows up on your dashboard. Choose your event IDs with more care than you choose the tool.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
9 sources
Read next on the roadmap · Stage 5: DeploymentA scanner that would have caught most of the Ultralytics attackzizmor reads GitHub Actions YAML without running a job, making it an easy handover check in client repos, where workflows outlive the engagement.