influxdata / influxdata/influxdb

Gauge: Units of measure

Open
#19,880 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature-request team/dumplings team/ui
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Proposal:
Gauge units of measure should scale based on the data.

Current behavior:
Today the units of measure need to be set by the user as a suffix. This means the user will be required to convert their data to the correct unit of measure to fit the defined suffix.

Desired behavior:
The gauge unit of measure should be able to scale with the data. Example of scaling the unit of measure would be network throughput. Network traffic can range from 0 bytes to 10s of gigabytes or even terabytes of throughput. The gauge should be able to convert a base measurement for the users. Within the customization panel users should be able to select a unit prefix such as SI, Binary or None. This would be a similar pattern to our graph visualization today. While this would work well for simple cases all data inputs would need to be in bytes format. Grafana handles this presentation by providing the users with a large section of preset data rate units.

Use case:
By implementing the ability to change the unit of measures and dynamically converting the gauge suffix, users are provided with a cleaner UI that scales well. I have a use case that would benefit from this change. Within my system I have multiple environments producing metrics around network throughput. One environment is relatively active which produces mb/s of network traffic. While the other environment is only producing kb/s of network traffic. This forces me to decide if I should present my data in Kb/s or Mb/s. Scaling unit of measure would handle this presentation decision for me. Since my data input is bytes I could easily set the upper bounds and allow the UI to handle converting the output to something that is presentable.

Examples of this problem.

Gauge where my upper limit is 1 Gb/s.
Screen Shot 2020-11-02 at 1 42 14 PM

Same gauge but looking at a different environment that is less utilized. I would expect the gauge to present the data in KB instead of MB.
image

Grafana has some nice presets that allow users to easily select which unit of measure to produce.
Screen Shot 2020-11-02 at 1 31 14 PM

Also having the ability to remove the threshold numbers from the gauge output would be nice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the gauge customization panel and its current user-set suffix behavior, then compare the requested unit-prefix choices with the Grafana presets mentioned in the issue. Done means gauge values can scale their displayed units, support SI, Binary, or None prefixes, and optionally hide threshold numbers.

Written by the indexing model from the issue text.

Assessment

Tech stack
grafana
Domain
design, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.