Enhanced Unit Cost Analytics

Analyzing unit costs with CloudZero

Understanding Unit Cost

Multi-tenant systems provide many cost, architecture, and operational benefits, however, these same efficiencies make it difficult to de-aggregate costs within those systems with the most common goal of understanding cost-per-customer (sometimes also called cost-per-tenant).

When empowered with this data, engineering teams can more successfully manage, optimize, and predict cloud costs as a factor of customer growth and ultimately build more elastic, cloud-native systems that maximize the return on their cloud investment.

Ultimately, organizations that have a strong command over their unit costs also have control over their gross margins and profitability. These organizations understand that even as cloud costs go up, as long as unit costs remain flat or even decrease, that they are delivering profitable innovation to their customers.


When unit costs are flat or decreasing, organizations are maximizing their cloud investment.

Solution Overview

Step 1: Identify the spend you wish to de-aggregate

Using CloudZero, create a view that highlights the spend you wish to de-aggregate using one or more filters


Step 2: Identify a Telemetry Source

You can use existing user or application log data or create new activity telemetry to de-aggregate the spend you identified in step 1. This telemetry should describe the activity you want to divide your cloud spend by. For example, data that describes the number of transactions-per-customer, per-hour, would allow you to calculate your cost-per-customer


How multiple sources of telemetry can be used to determine your cost per customer

Step 3: Transform and Transmit your Telemetry

Prepare your telemetry in Unit Cost Analytics (UCA) format and transmit this information to CloudZero. Customer usage can be aggregated to either hourly or daily granularity. Once aggregated you can form it into the JSON format for the API and send it to the CloudZero Unit Cost API. The full API documentation can be found here: Telemetry API Documentation.

Your stream will also appear on our Telemetry Streams page once we start to receive data.

Step 4: Review your Unit Cost Report

Once CloudZero is successfully receiving your unit cost telemetry, we will generate a report for your users to explore. To view this report, just click the Unit Cost tile on your dashboard.


Unit Cost tile on the dashboard

Collecting Unit Cost Telemetry

Understanding the activity of your users and systems is what drives CloudZero's ability to transform your cloud spend into unit cost metrics. With even a basic understanding of customer activity within your application, we can quickly calculate things like cost-per-customer.

When thinking about the sources of telemetry to collect, it's important to think in broad strokes first. Unlike monitoring tools, the telemetry you send CloudZero doesn't need to be perfect to gain valuable insights. Instead, start simple, and later as your accuracy needs increase, add additional telemetry streams. Telemetry streams can have overlapping coverage and are additive, with each one increasing the accuracy of the output.

Common Examples

Often you can reuse existing application data sources or you can choose to directly instrument your applications to create new sources of data. For example, existing application or load balancer logs can be good sources of metrics that represent how often users are accessing your services.

Processing logs

Even a simple grep + regex run daily using chron can provide useful metrics that CloudZero can use by extracting a customer ID or name from your logs and returning a simple count. Run only once a day a simple count of customers ID's accessing your system per day will provide enough information to calculate roughly which customers are using your system and how often.

Using AWS Lambda to instrument your system

You can use AWS Lambda to monitor a portion of your system. By using the event-driven nature of AWS, attach a lambda function to an S3 bucket, SNS topic, or even a CloudWatch log and use Lambda to send a CloudZero UCA event with every action.

Database metrics

An easy-to-run query that can describe customer activity can be a great way to quickly get started. For example, if the number of records stored per customer is roughly equivalent to which customers use your system the most, a small script to run this query and send the data to our API will work great.

Directly instrumenting your Application

For more advanced use cases where you want to have more control over how unit cost telemetry is reported you can directly instrument your application to report metrics directly to CloudZero's API.

What’s Next

Use the CloudZero API or S3 to send UCA telemetry to CloudZero