Commit 3991ec8
authored
fix(dynamo): adjusts DynamoTableGlobalSecondaryIndexMonitoring to respect localAlarmNamePrefixOverride (#629)
Fixes #628
This change passes the BaseMonitoringProps passed into
DynamoTableGlobalSecondaryIndexMonitoring along to the super class
constructor, which exposes `localAlarmNamePrefixOverride` to be consumed
by Monitoring.createAlarmFactory. Additionally, this changes the
construction of the alarm factory to use `createAlarmFactory` from the
parent class (thus using `localAlarmNamePrefixOverride`, rather than
that from the parent scope (MonitoringFacade, which doesn't have
`localAlarmNamePrefixOverride` available).
By doing so, we achieve the more expected behavior of having
`localAlarmNamePrefixOverride` influence the local portion of the alarm
name. By default, that portion is just the GSI name itself, and there
are cases where this can cause collisions (e.g. two GSIs with the same
name on different tables). Having `localAlarmNamePrefixOverride`
function as expected provides an escape hatch for this corner case
without changing the default naming behavior. (i.e. including table name
in the alarm name).
---
_By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license_1 parent 0b2bee6 commit 3991ec8
File tree
3 files changed
+317
-2
lines changed- lib/monitoring/aws-dynamo
- test/monitoring/aws-dynamo
- __snapshots__
3 files changed
+317
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
Lines changed: 255 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments