Skip to content

Code Insights: Support reverse label truncation for some compute powered charts

Created by: vovakulikov

Background

@vovakulikov It seems like most of the labels (from compute if it's aggregation by file path) will start with the same sequence of symbols so after truncation we have something like

  • enterprise/internal/...
  • enterprise/internal/...
  • enterprise/internal/... ...
Screenshot 2022-08-03 at 18 36 04

Which isn't so useful, So instead of this we should have the opposite anchor for truncation (beginning of the label) and have

  • .../filename1.js
  • .../filename2.js
  • .../filename4.js ...

The problem here is sometimes it's better to start with truncation from the beginning sometime it's better to start from the end of the string. @Alicja Suska

In this issue we should support reverse truncation logic for compute powered insight that have long labels with simular symbol sequence at the beginning and tructate them from the end of the label string.