Git Product home page Git Product logo

cloudzero-uca-tools's People

Contributors

dependabot[bot] avatar jabrielcjones avatar silvexis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudzero-uca-tools's Issues

Add Quick Start Documentation to Improve User Experience

Description

We can enhance user onboarding and adoption is by implementing Quick Start documentation that guides users through common scenarios and workflows.

Problem Statement

Currently, new users may face challenges when getting started with the project, as they may not have clear guidance on how to perform common tasks or utilize key features effectively. This lack of guidance can lead to frustration and may hinder user adoption.

Proposed Solution

We should add comprehensive Quick Start documentation that walks users through common scenarios, such as replicating Allocation and Unit Metric telemetry data over a given period of time and randomizing measurements in Allocation and Unit Metric telemetry data. The Quick Start guides should provide step-by-step instructions, accompanied by code examples and explanations, to help users quickly understand and utilize the project's features.

400 Client Error: "extra keys not allowed" When Sending Telemetry Data Due to Unnecessary "telemetry-stream" Key

Description:
A 400 Client Error: Bad Request is returned when attempting to send telemetry data to the CloudZero Unit Cost API at https://api.cloudzero.com/unit-cost/v1/telemetry/allocation/product-cost-per-customer-v1. The error indicates an "extra keys not allowed" issue, specifically identifying the telemetry-stream key within the payload as not permissible.

Error Details:

{
  "error": {
    "type": "InvalidRecordsException",
    "message": "extra keys not allowed @ data['records'][0]['telemetry-stream']. Got 'product-cost-per-customer-v1'",
    "stream_name": "product-cost-per-customer-v1",
    "record": {
      "timestamp": "2024-02-08 00:00:00+00:00",
      "granularity": "HOURLY",
      "element-name": "customer 1",
      "filter": {"custom:Products": ["Piper Billing"]},
      "telemetry-stream": "product-cost-per-customer-v1",
      "value": "10.1230"
    }
  }
}

Steps to Reproduce:

  1. Construct the request payload for the CloudZero Unit Cost API, mistakenly including the telemetry-stream key as part of the record.
  2. Send a POST request to https://api.cloudzero.com/unit-cost/v1/telemetry/allocation/product-cost-per-customer-v1 with the payload.
  3. Receive a 400 Client Error with the message indicating that the telemetry-stream key is not allowed.

Expected Behavior:
API requests should follow the documented schema, excluding the telemetry-stream key in the payload, to prevent the 400 Client Error.

Actual Behavior:
Including the telemetry-stream key in the payload causes a validation error and the API responds with a 400 Client Error: Bad Request.

Resolution:
To resolve this issue, the telemetry-stream key must be removed from the payload when sending data to the CloudZero Unit Cost API. Users should ensure that their request payload conforms strictly to the documented API schema, which does not include the telemetry-stream key for the allocation/product-cost-per-customer endpoint.

Action Required:

  • Users should review and update their request payloads to remove the telemetry-stream key before sending data to the CloudZero Unit Cost API.
  • It may be beneficial to update documentation or provide examples highlighting this requirement to assist users in constructing valid API requests.

Increase Default Precision and Allow Customization of Precision for Generated Data

Currently, the UCA Toolkit generates data with a default precision that may not always meet the specific needs of users. This enhancement proposes to increase the default precision for generated and to introduce a feature that allows users to customize the default precision. Users should have the flexibility to adjust the default precision via the UCA configuration file.

Proposed Changes:

  1. Introduce a new configuration option in the UCA Toolkit settings that allows users to specify the precision for generated data.
  2. Provide clear documentation on how users can configure the precision in the UCA Toolkit's configuration file.
  3. Implement functionality within the UCA Toolkit to read the specified precision from the configuration file and use it during data generation.
  4. Ensure backward compatibility by setting a reasonable default precision if no custom value is provided in the configuration file.

Expected Benefits:

  • Enhanced flexibility for users to generate data with the desired precision.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.