-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix maxdimassociator to loop through all mappings
Mappings in the new associator are sorted by decreasing number of dimensions, e.g. [ Mapping_Dim_A_Dim_B, Mapping_Dim_A_Dim_C, Mapping_Dim_A ] If trying to map a metric with Dim_A, Dim_B and Dim_C, the current implementation would pic the first mapping (Mapping_Dim_A_Dim_B) because it already matches part of the metric dimensions and would try to find a match for dimensions names and values. However, if values don't match it would give up and mark the metric to be skipped. The new implementation continues to loop through the regex mappings to check if there another one that contains the metric dimensions. In the example above, Mapping_Dim_A_Dim_C would match again and the algo would try again to find a match for dimensions names and values. This should fix cases where ListMetrics returns metrics with more dimensions than can be extracted from the ARN regex. E.g. for ApiGateway the ARN contains only the ApiId dimension, but we should now be able to match metrics that contains both ApiId and Method (as long as the ApiId value matches).
- Loading branch information
1 parent
f0ceb44
commit 72270b0
Showing
2 changed files
with
73 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters