skip to content

How would you standardise Helicone properties and user IDs across teams for cost attribution?

level: principalimportance: should knowfreq 35%

answer

  1. consistency beats granularity
  2. a wiki page will not hold the line
  3. set the defaults in a shared client
  4. identity is opaque, never an email
  5. granularity follows the decision it feeds

basics

~20 s

Agree a small fixed vocabulary — environment, service, feature, version — and enforce it in a shared client wrapper rather than by convention, with Helicone-User-Id carrying an opaque internal identifier. Decide up front what granularity of attribution the business will actually act on.

solid answer

~50 s

Attribution fails organisationally, not technically: the headers are trivial, but ten teams inventing their own names produce dashboards that cannot be summed. I would fix the dimension set deliberately and keep it small — environment, service, feature, and a version or prompt-version tag — because every dimension you add has to be populated by every caller forever to stay comparable. Then I would make it structural: a shared client factory that sets the standard properties from the runtime environment, so a service gets attribution by using the platform rather than by remembering a header. `Helicone-User-Id` should carry a stable opaque internal id, never an email or name, since it lands in a trace store many people can read. The strategy question underneath is what decision the numbers feed. Chargeback per team needs only coarse dimensions and needs them to reconcile with the provider invoice; per-customer margin needs tenant-level attribution and a warehouse export, because a vendor dashboard is a poor system of record for finance.

go deeper

for a junior

Know that consistent property names across services are what make dashboards aggregate, and that user identifiers should be opaque rather than personal data.

for a middle

Explain why the standard dimensions belong in a shared client wrapper rather than at each call site, and why values must be normalised in one place.

for a senior

Argue rollout order and drift: properties are not retroactive, so the standard set ships before the investigation, and untagged traffic needs a check that flags it.

for a principal

Own the smallest dimension set that answers questions the organisation acts on, decide the identity unit and its governance, and state plainly which numbers are indicative versus fit for finance.

## The real failure mode The mechanics of attribution in Helicone are a day-one task: set `Helicone-Property-*` headers for the dimensions you want and `Helicone-User-Id` for identity, and the dashboards slice accordingly. The reason organisations still cannot answer "what does feature X cost us per month" a year later is never the mechanics. It is that `env`, `environment` and `ENV` all exist; that half the services set nothing; that one team put a tenant id in a property and another put it in the user id; and that the eval pipeline's traffic is mixed into production numbers. Every one of those is a coordination problem, so the design has to be a coordination design. ## Fix a small vocabulary Start from the questions the business will ask, not from the fields available. Usually that is: which environment, which service, which product feature, which version. Four dimensions covers most of it, and the discipline is to resist growth — a dimension is only useful if *every* caller populates it, so each addition is a fleet-wide obligation, not a local decision. Write the vocabulary down with the exact header names, the allowed values, and the casing. Keep every value low cardinality and enumerable. Identity goes in `Helicone-User-Id`; per-run grouping goes in the session headers. Reaching for a property to hold a unique value produces a dimension with one member per row and quietly makes the dashboards useless. ## Enforce it in code, not in a document A wiki page describing header conventions has a half-life of about one quarter. What works is a shared client wrapper or factory that every service uses to construct its LLM client, which sets `Helicone-Auth` and the standard properties from the deployment environment automatically. Service and environment come from the platform, version from the build, and only the feature name is left for the caller to supply — ideally as a required argument, so omitting it is a compile-time or review-time problem rather than a missing dashboard column six weeks later. That wrapper is also where you normalise values, so `prod` versus `production` can never diverge, and where you later change integration mode for a whole fleet without touching call sites. ## Identity without PII `Helicone-User-Id` is the dimension that answers per-user and per-tenant cost questions, and it is also the one most likely to leak. It travels to and is stored by a trace store that many engineers can read, alongside the prompts themselves. Use a stable opaque internal identifier — an account id or a hashed user key — never an email address, username or anything else that identifies a person directly. Decide deliberately whether the unit of identity is the end user or the paying tenant; for a B2B product, tenant-level attribution is usually the one finance cares about, and per-end-user detail adds sensitivity without adding an answer. ## Match granularity to the decision Attribution is only worth what it changes. Ask what decision the number feeds before choosing a granularity: - **Budget awareness** — coarse dimensions (service, environment) are enough, and cheap to maintain. - **Team chargeback** — needs to reconcile with the provider invoice, which means being honest that derived cost figures can drift from what you are actually billed. Treat the vendor's number as the allocation key and the invoice as the total, rather than expecting them to match to the cent. - **Per-customer margin or usage-based pricing** — needs tenant-level attribution and, realistically, an export into your own warehouse. A vendor dashboard is a fine investigative tool and a poor financial system of record; you want the data joined to your own billing entities, retained on your terms, and reproducible after a retention window passes. ## Rollout and drift Two practical constraints shape the plan. Properties are not retroactive: a dimension exists only on traffic logged after you shipped the header, so the standard set should go out before anyone needs a breakdown, and comparisons should not straddle the rollout boundary. And attribution decays — new services appear, features get renamed, someone adds a property for an incident and leaves it. Give the vocabulary an owner, review it on a cadence, and add a simple check that flags traffic arriving without the standard dimensions, so gaps surface as a small ongoing fix rather than as a discovery during budget season. ## Where the tradeoff really sits The temptation is to instrument everything at maximum granularity because the headers are free. They are not free: each dimension is a permanent obligation on every caller, each identity field is a governance question, and every unused breakdown is maintenance nobody signed up for. The principal-level answer picks the smallest dimension set that answers the questions the organisation actually acts on, makes it structural so it survives turnover, and is explicit about which numbers are indicative and which are allowed to reach finance.

  • Why not simply let each team pick its own property names and reconcile later?
    Because reconciliation is guesswork after the fact and the historical data cannot be fixed — properties are recorded on the request that carried them, so a renaming exercise only improves traffic from that point on. Divergent names also break every fleet-level rollup, which is the only view leadership asks for. A shared client that sets the standard dimensions costs far less than reconciling six vocabularies.
  • Should Helicone's cost dashboard be the system of record for chargeback?
    No. Its cost figures are derived from observed token usage and a price table, so they are excellent for allocation and investigation but can drift from the provider's invoice — streamed calls without a usage block are the classic source. Use the invoice as the authoritative total and the tool's breakdown as the allocation key, and export to your own warehouse if the numbers need to survive a retention window or join to billing entities.
  • How do you keep evaluation and load-test traffic out of production cost figures?
    Make environment a mandatory standard property set by the shared client from the deployment environment, so non-production traffic is tagged at the source rather than filtered by guesswork later. Then default every dashboard and report to filter on it. Eval runs can generate more calls than real users, so untagged test traffic does not just add noise — it can dominate the totals.

saying these in an interview costs you the question

  • Treating a wiki page of conventions as enforcement
  • Putting user emails in Helicone-User-Id
  • Adding many dimensions because headers are free
  • Expecting derived dashboard cost to match the invoice exactly
  • Assuming a new property backfills onto historical traffic

context