cdk-monitoring-constructs
cdk-monitoring-constructs copied to clipboard
[custom] Expose a `position?: AxisPosition` property at the metric level
Feature scope
CloudWatch
Describe your suggested feature
Right now, the monitorCustom()
method requires a metricGroups: CustomMetricGroup[]
property. Each of these CustomMetricGroup
objects has metric-group level graph configuration. However, each possible CustomMetric
type in here does not seem to offer the ability to configure which axis position (i.e. right/left) a given metric should be displayed on. It looks like a property like this is exposed in CustomMetricWithAlarm
, but it would be great to be able to configure axis positions for metrics in a dashboard that may not have associated alarms. I think it also makes more sense that axis position is associated with the metric, not alarm (but I could be missing something here)
As a workaround, I've created a CustomMetricWithAlarm
object with an empty addAlarm
prop. For example:
{
metric: metric,
alarmFriendlyName: alarmFriendlyName,
addAlarm: {},
position: AxisPosition.RIGHT,
}