Create the transform
1
Open transforms
In Settings > Organization > Transforms, click New transform. The
transform opens on the Mapping tab.

2
Name it
Click the name at the top of the page and enter a name that says where the
usage comes from, such as
Gateway token events.3
Pick the format
In Protocol, select JSON, OpenTelemetry, or Prometheus. The
sample payload and mappings change to a starting point for that format. For
Prometheus, also select Metric type: Counter or Gauge. Refer to
Counters and gauges.

4
Paste a sample event
In Sample payload, paste an event your service sends. For OpenTelemetry and
Prometheus, the sample is the shape CostGraph gives each data point. Refer to
Event fields.
5
Set the event time
For JSON, enter in Event time the field that says when the usage happened,
such as
event.time. It’s required, and it sets the charge period. An event
without it is rejected. OpenTelemetry and Prometheus take the time from the
data point.6
Map the columns
In FOCUS 1.2 columns, choose a source for each column. Required lists
the columns every row needs. Mapped lists the ones you have set. Refer to
Column sources.
7
Save
Check Resulting row, then click Save transform. The button is enabled
when the banner says Ready to save.

Column sources
Each column takes its value from one of these sources:PricingQuantity must be mapped to a number, because CostGraph prices that
quantity. Map SubAccountId to your customer or tenant identifier to see cost per
customer.
CostGraph sets the charge and billing periods, the provider name, and the
cost columns BilledCost, EffectiveCost, ListCost, and ContractedCost.
A column with a problem shows the error under it, and the banner counts the
columns to fix before saving.
Expressions
Expressions use the Common Expression Language (CEL) and read the event asevent. The following expressions show the common patterns.
Event fields
For JSON,event is the object you send. For OpenTelemetry and Prometheus,
CostGraph builds the event from each data point.
- OpenTelemetry
- Prometheus
resource holds the resource attributes and attributes the data point
attributes. The event time is end.A gauge event has value, the value held, and value_hours, that value
times the hours between start and end. Its event time is start. A
histogram event has count and sum instead of value.