telemetry

Using the Unit Cost Activity (UCA) event format you can easily represent system or user activity and map that activity to any spend tracked by CloudZero.

👍

CloudZero Telemetry API Endpoint

https://api.cloudzero.com/unit-cost/v1/telemetry

API Authorization

  1. You can obtain a CloudZero API Key from https://app.cloudzero.com/organization/api-keys
  2. Add an Authorization: <cloudzero-api-key> header to each request

Limits

  • You can send up 8.5m records per day per organization
  • Max request size: 10KB size limit per record and 5MB size limit per request

Example

For example, if you wanted to transmit the activity for the customer Hooli on January 25th, 2021, during the whole day, where your billing feature processed 250M records you would send.

{
  "records": [
    {
        "timestamp": "2020-01-25T00:00:00Z",
        "granularity": "DAILY",
        "cost-context": "Cost-Per-Customer",
        "target": {
        "feature": [
            "billing"
        ],
        "tag:environment": [
          "prod"
        ],
        "tag:owner": [
          "frank",
          "sandy"
        ]
        },
        "id": "<HOOLI-CUSTOMER-ID>",
        "telemetry-stream": "billing-records-processed",
        "value": "250000000"
    }
  ]
}

📘

Targeting Limitations

  • When the resource key is used, the only sibling key that is allowed is usage_family.
  • Each telemetry record can’t have more than 5 filter keys and each set of values can’t have more than 20 values.
  • When multiple filter values are specified, those values are aggregated together. When multiple types of filter keys are present, those types of filters are combined using the intersection.
  • For example: { "feature": ["1", "2"], "account": ["A"] } translates to WHERE (feature = “1” OR feature = “2”) AND account = “A”
  • All records within a telemetry-stream must have the same set of filter keys defined in their target.