cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

Allow configurable dynamic labels

Open christophercarney opened this issue 2 years ago • 1 comments

Feature scope

core

Describe your suggested feature

Currently there is sparse use of "Dynamic Labels" which can be used to increase the overall readability of the graphs for the current period by including summary statistics. (For example, "avg" is used for API Gateway V2 Latency)

Including dynamic labels for graphs is considered best practice but not all users may want them. A reasonable first step would be to separate labels into a "normal part" and "dynamic part" -- all labels should be of the format ${normal} ${dynamic}

One issue here is different dynamic labels make sense in different contexts. In order to roll this feature out gradually it may make sense to disable by default. If a metric is a COUNT it could use the label " [Avg: ${AVG}, Max: ${MAX}, Min: ${MIN}, Sum: ${SUM}]" and the default metric label could be " [Avg: ${AVG}, Max: ${MAX}, Min: ${MIN}]"

christophercarney avatar Sep 06 '22 17:09 christophercarney

I like the idea in general, but I agree we need to find a way to launch it gracefully and have the right granularity. As you mention, not all make sense in all contexts, so it could be something defined for each metric usage individually.

Also, some widgets are pretty packed, so adding this content everywhere would have a major layout impact.

One way I see as an elegant solution would be to join this request with the other one that asks for more control over the widgets. We could introduce some widget-customizing properties, which would not only include visibility, sizes, etc, but also the presence of dynamic labels.

Something like... {latency: {addDynamicLabels: true}, errors: {addDynamicLabels: true}, connections: {visible: false}

voho avatar Sep 13 '22 11:09 voho