Emit cost per call

meter.counter("llm.cost.usd",
    Tag.of("agent", agentName),
    Tag.of("model", modelName),
    Tag.of("tenant", tenantId))
    .increment(cost);
Advertisement

Aggregation levels

Per-agent for eng team. Per-tenant for billing. Per-user for anomaly detection. Same metric, different queries.

Advertisement

Watch bucket cardinality

Per-user tag balloons cardinality. Bucket into user tiers or sample.