Skip to content

Commit 4bce103

Browse files
authored
fix(kinesis): change Provisioned Capacity Exceeded metric's Y axis label to CountAxisFromZero (#419)
Fixes #418 --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
1 parent de057f9 commit 4bce103

File tree

5 files changed

+40
-12
lines changed

5 files changed

+40
-12
lines changed

API.md

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/monitoring/aws-kinesis/KinesisDataStreamMetricFactory.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,21 @@ export class KinesisDataStreamMetricFactory {
212212
);
213213
}
214214

215+
/**
216+
* @deprecated please use `metricReadProvisionedThroughputExceeded` instead
217+
*/
215218
metricReadProvisionedThroughputExceededPercent() {
219+
return this.metricReadProvisionedThroughputExceeded();
220+
}
221+
222+
/**
223+
* @deprecated please use `metricWriteProvisionedThroughputExceeded` instead
224+
*/
225+
metricWriteProvisionedThroughputExceededPercent() {
226+
return this.metricWriteProvisionedThroughputExceeded();
227+
}
228+
229+
metricReadProvisionedThroughputExceeded() {
216230
return this.metricFactory.createMetric(
217231
"ReadProvisionedThroughputExceeded",
218232
MetricStatistic.AVERAGE,
@@ -223,7 +237,7 @@ export class KinesisDataStreamMetricFactory {
223237
);
224238
}
225239

226-
metricWriteProvisionedThroughputExceededPercent() {
240+
metricWriteProvisionedThroughputExceeded() {
227241
return this.metricFactory.createMetric(
228242
"WriteProvisionedThroughputExceeded",
229243
MetricStatistic.AVERAGE,

lib/monitoring/aws-kinesis/KinesisDataStreamMonitoring.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ export class KinesisDataStreamMonitoring extends Monitoring {
139139
this.putRecordsFailedRecordsCountMetric =
140140
metricFactory.metricPutRecordsFailedRecordsCount();
141141
this.readProvisionedThroughputExceededMetric =
142-
metricFactory.metricReadProvisionedThroughputExceededPercent();
142+
metricFactory.metricReadProvisionedThroughputExceeded();
143143
this.writeProvisionedThroughputExceededMetric =
144-
metricFactory.metricWriteProvisionedThroughputExceededPercent();
144+
metricFactory.metricWriteProvisionedThroughputExceeded();
145145

146146
for (const disambiguator in props.addIteratorMaxAgeAlarm) {
147147
const alarmProps = props.addIteratorMaxAgeAlarm[disambiguator];
@@ -292,7 +292,7 @@ export class KinesisDataStreamMonitoring extends Monitoring {
292292
this.readProvisionedThroughputExceededMetric,
293293
this.writeProvisionedThroughputExceededMetric,
294294
],
295-
leftYAxis: TimeAxisMillisFromZero,
295+
leftYAxis: CountAxisFromZero,
296296
leftAnnotations: this.provisionedCapacityAnnotations,
297297
});
298298
}

test/facade/__snapshots__/MonitoringAspect.test.ts.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/monitoring/aws-kinesis/__snapshots__/KinesisDataStreamMonitoring.test.ts.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)