Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Add more number format options #72711

Closed
wylieconlon opened this issue Jul 21, 2020 · 6 comments
Closed

[Lens] Add more number format options #72711

wylieconlon opened this issue Jul 21, 2020 · 6 comments
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@wylieconlon
Copy link
Contributor

wylieconlon commented Jul 21, 2020

Lens has a limited set of number formatters, but Kibana already supports a larger set that we should enable in Lens.

Format name Example input Example output Comment
Short number 2000 2k Already has numeral pattern
Duration (must specify input unit, optional output units) 2000, input unit: seconds, output unit: auto 00:33:33 This is converting to hours, minutes, seconds using the numeral formatter
Duration 2000, input unit: milliseconds, output unit: auto 2,000ms (this formatter just applies a ms suffix)
Duration 2000, input unit: seconds, output unit: days Screenshot 2020-07-21 14 44 50 This kind of straight conversion without the "human-readable" part is not one of the default duration formatters, but should be
Bytes (SI) 2000 1.95KiB Using the 0.[00]bb (bytes binary) numeral format
Bytes (1000) 2000 2.00kB Using the 0.[00]bd (bytes decimal) numeral format
Bits (1000) 2000 1.95Kibit Using the 0.[00]bitb numeral format
Bits (1024) 2000 2.00kbit Using the 0.[00]bitd numeral format

The main reason to add these new "duration" and "bytes" options is to make Lens support the most common formats for metrics data, which are not handled well in Kibana overall.

The duration formatter is particularly problematic in Kibana, so Lens has an opportunity to simplify. Most duration units should get displayed with a simple suffix based on the input unit.

@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 21, 2020
@wylieconlon wylieconlon added this to Long-term goals in Lens via automation Jul 21, 2020
@wylieconlon
Copy link
Contributor Author

Anyone interested in tackling this issue for Lens should consider improving the duration formatter for all users.

@ghudgins
Copy link

ghudgins commented Sep 14, 2021

This is becoming more important because formula does not allow us to use data view formatting options

@ojdo
Copy link

ojdo commented Mar 31, 2022

Just a user's perspective: this issue is what separates Lens from being able to "natively" convert from accumulated Netflow byte counts to bit-oriented (Mbit/s) transfer rates. Right now it goes 80% of the way to (Megabyte/s):

  • Scale to time unit (/s) ✔️
  • Byte formatting (MB) ✔️
  • Bit formatting (Mbit) ❌

Thanks to #94605, I will probably be able to accomplish this myself soon with a formula, but as these formatters are already in Kibana, this looks frustratingly close.

In case you do not want to introduce additional UI, Lens could simply start honoring Kibana's preferences w.r.t. to format:bytes:defaultPattern. This wouldn't help with the "Duration" use case, though.

@ninoslavmiskovic
Copy link
Contributor

@ojdo - We are going to add bit format capabilities in Lens for 8.8: #153389

@lalit-satapathy - Does this help you with migration?

@lalit-satapathy
Copy link

Thanks for the update @ninoslavmiskovic. We will check how to use this for phase2.

@stratoula
Copy link
Contributor

Closing this as everything has been addressed in the latest kibana versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

No branches or pull requests

7 participants