Skip to content

monitoring: replace RawVariables with RawTransform

Warren Gifford requested to merge monitoring/remove-rawvariables into main

Created by: bobheadxi

Some cleanup for fun, writing a small personal blog thing about the generator for and noticed this potential streamlining 😁

When it comes down to it, the single usage of RawVariables only had 2 custom fields, and disables $all. This replaces it with something more ergonomic and less hacky - variables can now provide RawTransform to manipulate the generated variable

Also extends Options so that you can disable the all option we generate, configure a custom Type, and set a default selected value, negating the need for the one usage of RawTransform for now. I think all this configuration makes sense to be standardized here. Details: 863c4d4 (#31518)

Test plan

With the config described in https://github.com/sourcegraph/sourcegraph/pull/31530 :

sg start monitoring

Kapture 2022-02-18 at 15 01 56

Before, after:

image image

Since these are static options the refresh was unnecessary

Merge request reports

Loading