Open
Description
Describe the feature
In the following code:
const sigkillMetricFilter = new MetricFilter(this, 'SigkillMetricFilter', {
filterPattern: FilterPattern.literal('SIGKILL'),
logGroup: this.logGroup,
metricNamespace,
metricName: 'SigkillCount',
metricValue: '1',
});
// Create a metric using the filter
const sigkillMetric = new Metric({
namespace: metricNamespace,
metricName: 'SigkillCount',
statistic: 'Sum',
period: Duration.minutes(5),
});
the metricName field is duplicated in two constructs, because it's not possible to do:
const sigkillMetric = new Metric({
namespace: metricNamespace,
metricName: sigkillMetricFilter.metricName, // this field is private
statistic: 'Sum',
period: Duration.minutes(5),
});
This doesn't allow for proper object dependency/relationship.
Use Case
As above.
Proposed Solution
Make the field public.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
Environment details (OS name and version, etc.)
MacOS