Step 3: Using the Telemetry Stream in an Allocation Dimension
Once the Telemetry data starts flowing and the stream's Ingest Status
on CloudZero's Telemetry page is Available
, then we will be able to reference this stream in a new Allocation
dimension.
Let's add this Allocation
dimension to our CostFormation:
...
SplitDataLake:
Type: Allocation
Name: Split Data Lake
AllocateByStreams:
Streams:
- rds-writes-by-product
Notice that we use the name of that stream rds-writes-by-product
that matches the "telemetry-stream"
field in our telemetry records (see lines 10 and 20 of the telemetry record JSON). The id
field in the telemetry record (Email
and Messaging
) will now correspond to elements in the Split Data Lake
dimension.
In this case, the cost of each of these elements on a given day is a portion of the Shared Data Lake
element in the Shared RDS
dimension. This portion is defined by the proportional relationship between telemetry records. For example, in the previous step, we defined two records assigning the value 100045
to Email
and 1000600
to Messaging
, so approximately 9% of the shared cost would be allocated to the Email
element and 91% would be allocated to the Messaging
element for that day, 2020-01-25T00:00:00Z
.
With that, we are finished! Let's review everything in the next step.
Link to Previous Step
Updated 10 months ago