@cdklabs/multi-az-observability 0.0.1-alpha.41 → 0.0.1-alpha.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.jsii +127 -35
  2. package/API.md +120 -17
  3. package/lib/alarmsandrules/AvailabilityAndLatencyAlarmsAndRules.d.ts +2 -1
  4. package/lib/alarmsandrules/AvailabilityAndLatencyAlarmsAndRules.js +4 -3
  5. package/lib/alarmsandrules/CanaryOperationZonalAlarmsAndRules.js +3 -2
  6. package/lib/alarmsandrules/ServerSideOperationZonalAlarmsAndRules.js +3 -2
  7. package/lib/alarmsandrules/props/OperationAlarmsAndRulesProps.d.ts +10 -0
  8. package/lib/alarmsandrules/props/OperationAlarmsAndRulesProps.js +1 -1
  9. package/lib/azmapper/AvailabilityZoneMapper.js +1 -1
  10. package/lib/basic_observability/BasicServiceMultiAZObservability.js +1 -1
  11. package/lib/canaries/src/canary.zip +0 -0
  12. package/lib/index.d.ts +1 -0
  13. package/lib/index.js +4 -2
  14. package/lib/monitoring/src/monitoring-layer.zip +0 -0
  15. package/lib/outlier-detection/LatencyOutlierMetricAggregation.d.ts +22 -0
  16. package/lib/outlier-detection/LatencyOutlierMetricAggregation.js +27 -0
  17. package/lib/outlier-detection/src/outlier-detection.zip +0 -0
  18. package/lib/outlier-detection/src/scipy-layer.zip +0 -0
  19. package/lib/services/CanaryMetrics.js +1 -1
  20. package/lib/services/CanaryTestAvailabilityMetricsOverride.js +1 -1
  21. package/lib/services/CanaryTestLatencyMetricsOverride.js +1 -1
  22. package/lib/services/CanaryTestMetricsOverride.js +1 -1
  23. package/lib/services/ContributorInsightRuleDetails.js +1 -1
  24. package/lib/services/InstrumentedServiceMultiAZObservability.js +63 -29
  25. package/lib/services/Operation.js +1 -1
  26. package/lib/services/OperationAvailabilityMetricDetails.js +1 -1
  27. package/lib/services/OperationLatencyMetricDetails.js +1 -1
  28. package/lib/services/OperationMetricDetails.js +1 -1
  29. package/lib/services/Service.js +1 -1
  30. package/lib/services/ServiceAvailabilityMetricDetails.js +1 -1
  31. package/lib/services/ServiceLatencyMetricDetails.js +1 -1
  32. package/lib/services/ServiceMetricDetails.js +1 -1
  33. package/lib/services/props/InstrumentedServiceMultiAZObservabilityProps.d.ts +49 -4
  34. package/lib/services/props/InstrumentedServiceMultiAZObservabilityProps.js +1 -1
  35. package/lib/services/props/MetricDimensions.js +1 -1
  36. package/package.json +1 -1
package/.jsii CHANGED
@@ -8598,7 +8598,7 @@
8598
8598
  },
8599
8599
  "locationInModule": {
8600
8600
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8601
- "line": 351
8601
+ "line": 352
8602
8602
  },
8603
8603
  "parameters": [
8604
8604
  {
@@ -8627,7 +8627,7 @@
8627
8627
  "kind": "class",
8628
8628
  "locationInModule": {
8629
8629
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8630
- "line": 37
8630
+ "line": 38
8631
8631
  },
8632
8632
  "name": "InstrumentedServiceMultiAZObservability",
8633
8633
  "properties": [
@@ -8639,7 +8639,7 @@
8639
8639
  "immutable": true,
8640
8640
  "locationInModule": {
8641
8641
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8642
- "line": 45
8642
+ "line": 46
8643
8643
  },
8644
8644
  "name": "perOperationAlarmsAndRules",
8645
8645
  "overrides": "@cdklabs/multi-az-observability.IInstrumentedServiceMultiAZObservability",
@@ -8661,7 +8661,7 @@
8661
8661
  "immutable": true,
8662
8662
  "locationInModule": {
8663
8663
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8664
- "line": 55
8664
+ "line": 56
8665
8665
  },
8666
8666
  "name": "perOperationZonalImpactAlarms",
8667
8667
  "overrides": "@cdklabs/multi-az-observability.IInstrumentedServiceMultiAZObservability",
@@ -8687,7 +8687,7 @@
8687
8687
  "immutable": true,
8688
8688
  "locationInModule": {
8689
8689
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8690
- "line": 62
8690
+ "line": 63
8691
8691
  },
8692
8692
  "name": "serviceAlarms",
8693
8693
  "overrides": "@cdklabs/multi-az-observability.IInstrumentedServiceMultiAZObservability",
@@ -8704,7 +8704,7 @@
8704
8704
  "immutable": true,
8705
8705
  "locationInModule": {
8706
8706
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8707
- "line": 85
8707
+ "line": 86
8708
8708
  },
8709
8709
  "name": "canaryLogGroup",
8710
8710
  "optional": true,
@@ -8721,7 +8721,7 @@
8721
8721
  "immutable": true,
8722
8722
  "locationInModule": {
8723
8723
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8724
- "line": 67
8724
+ "line": 68
8725
8725
  },
8726
8726
  "name": "operationDashboards",
8727
8727
  "optional": true,
@@ -8743,7 +8743,7 @@
8743
8743
  "immutable": true,
8744
8744
  "locationInModule": {
8745
8745
  "filename": "src/services/InstrumentedServiceMultiAZObservability.ts",
8746
- "line": 72
8746
+ "line": 73
8747
8747
  },
8748
8748
  "name": "serviceDashboard",
8749
8749
  "optional": true,
@@ -8766,26 +8766,10 @@
8766
8766
  "kind": "interface",
8767
8767
  "locationInModule": {
8768
8768
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8769
- "line": 11
8769
+ "line": 12
8770
8770
  },
8771
8771
  "name": "InstrumentedServiceMultiAZObservabilityProps",
8772
8772
  "properties": [
8773
- {
8774
- "abstract": true,
8775
- "docs": {
8776
- "stability": "experimental",
8777
- "summary": "The algorithm to use for performing outlier detection."
8778
- },
8779
- "immutable": true,
8780
- "locationInModule": {
8781
- "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8782
- "line": 52
8783
- },
8784
- "name": "outlierDetectionAlgorithm",
8785
- "type": {
8786
- "fqn": "@cdklabs/multi-az-observability.OutlierDetectionAlgorithm"
8787
- }
8788
- },
8789
8773
  {
8790
8774
  "abstract": true,
8791
8775
  "docs": {
@@ -8795,7 +8779,7 @@
8795
8779
  "immutable": true,
8796
8780
  "locationInModule": {
8797
8781
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8798
- "line": 15
8782
+ "line": 16
8799
8783
  },
8800
8784
  "name": "service",
8801
8785
  "type": {
@@ -8813,7 +8797,7 @@
8813
8797
  "immutable": true,
8814
8798
  "locationInModule": {
8815
8799
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8816
- "line": 76
8800
+ "line": 124
8817
8801
  },
8818
8802
  "name": "assetsBucketParameterName",
8819
8803
  "optional": true,
@@ -8832,7 +8816,7 @@
8832
8816
  "immutable": true,
8833
8817
  "locationInModule": {
8834
8818
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8835
- "line": 96
8819
+ "line": 144
8836
8820
  },
8837
8821
  "name": "assetsBucketPrefixParameterName",
8838
8822
  "optional": true,
@@ -8840,6 +8824,44 @@
8840
8824
  "primitive": "string"
8841
8825
  }
8842
8826
  },
8827
+ {
8828
+ "abstract": true,
8829
+ "docs": {
8830
+ "default": "OutlierDetectionAlgorithm.STATIC",
8831
+ "remarks": "** Currently only STATIC is supported **",
8832
+ "stability": "experimental",
8833
+ "summary": "The algorithm to use for performing outlier detection for availability metrics."
8834
+ },
8835
+ "immutable": true,
8836
+ "locationInModule": {
8837
+ "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8838
+ "line": 57
8839
+ },
8840
+ "name": "availabilityOutlierDetectionAlgorithm",
8841
+ "optional": true,
8842
+ "type": {
8843
+ "fqn": "@cdklabs/multi-az-observability.OutlierDetectionAlgorithm"
8844
+ }
8845
+ },
8846
+ {
8847
+ "abstract": true,
8848
+ "docs": {
8849
+ "default": "- Depends on the outlier detection algorithm selected",
8850
+ "remarks": "This number is interpreted\ndifferently for different outlier algorithms. When used with\nSTATIC, the number should be between 0 and 1 to represent the\npercentage of errors (like .7) that an AZ must be responsible\nfor to be considered an outlier. When used with CHI_SQUARED, it\nrepresents the p value that indicates statistical significance, like\n0.05 which means the skew has less than or equal to a 5% chance of\noccuring. When used with Z_SCORE it indicates how many standard\ndeviations to evaluate for an AZ being an outlier, typically 3 is\nstandard for Z_SCORE.\n\nStandard defaults based on the outlier detection algorithm:\nSTATIC: 0.7\nCHI_SQUARED: 0.05\nZ_SCORE: 3\nIQR: 1.5\nMAD: 3",
8851
+ "stability": "experimental",
8852
+ "summary": "The outlier threshold for determining if an AZ is an outlier for faults."
8853
+ },
8854
+ "immutable": true,
8855
+ "locationInModule": {
8856
+ "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8857
+ "line": 48
8858
+ },
8859
+ "name": "availabilityOutlierThreshold",
8860
+ "optional": true,
8861
+ "type": {
8862
+ "primitive": "number"
8863
+ }
8864
+ },
8843
8865
  {
8844
8866
  "abstract": true,
8845
8867
  "docs": {
@@ -8850,7 +8872,7 @@
8850
8872
  "immutable": true,
8851
8873
  "locationInModule": {
8852
8874
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8853
- "line": 23
8875
+ "line": 24
8854
8876
  },
8855
8877
  "name": "createDashboards",
8856
8878
  "optional": true,
@@ -8868,7 +8890,7 @@
8868
8890
  "immutable": true,
8869
8891
  "locationInModule": {
8870
8892
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8871
- "line": 60
8893
+ "line": 108
8872
8894
  },
8873
8895
  "name": "interval",
8874
8896
  "optional": true,
@@ -8876,20 +8898,57 @@
8876
8898
  "fqn": "aws-cdk-lib.Duration"
8877
8899
  }
8878
8900
  },
8901
+ {
8902
+ "abstract": true,
8903
+ "docs": {
8904
+ "default": "OutlierDetectionAlgorithm.STATIC",
8905
+ "remarks": "** Currently only STATIC is supported **",
8906
+ "stability": "experimental",
8907
+ "summary": "The algorithm to use for performing outlier detection for latency metrics."
8908
+ },
8909
+ "immutable": true,
8910
+ "locationInModule": {
8911
+ "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8912
+ "line": 90
8913
+ },
8914
+ "name": "latencyOutlierDetectionAlgorithm",
8915
+ "optional": true,
8916
+ "type": {
8917
+ "fqn": "@cdklabs/multi-az-observability.OutlierDetectionAlgorithm"
8918
+ }
8919
+ },
8920
+ {
8921
+ "abstract": true,
8922
+ "docs": {
8923
+ "default": "LatencyOutlierMetric.COUNT",
8924
+ "stability": "experimental",
8925
+ "summary": "The metric for latency to use in outlier detection, which means whether the algorithm uses a count of requests exceeding your latency threshold or whether it uses the actual latency values at your latency alarm threshold statistic."
8926
+ },
8927
+ "immutable": true,
8928
+ "locationInModule": {
8929
+ "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8930
+ "line": 100
8931
+ },
8932
+ "name": "latencyOutlierMetricAggregation",
8933
+ "optional": true,
8934
+ "type": {
8935
+ "fqn": "@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation"
8936
+ }
8937
+ },
8879
8938
  {
8880
8939
  "abstract": true,
8881
8940
  "docs": {
8882
8941
  "default": "- Depends on the outlier detection algorithm selected",
8883
8942
  "remarks": "This number is interpreted\ndifferently for different outlier algorithms. When used with\nSTATIC, the number should be between 0 and 1 to represent the\npercentage of errors (like .7) that an AZ must be responsible\nfor to be considered an outlier. When used with CHI_SQUARED, it\nrepresents the p value that indicates statistical significance, like\n0.05 which means the skew has less than or equal to a 5% chance of\noccuring. When used with Z_SCORE it indicates how many standard\ndeviations to evaluate for an AZ being an outlier, typically 3 is\nstandard for Z_SCORE.\n\nStandard defaults based on the outlier detection algorithm:\nSTATIC: 0.7\nCHI_SQUARED: 0.05\nZ_SCORE: 3\nIQR: 1.5\nMAD: 3",
8884
8943
  "stability": "experimental",
8885
- "summary": "The outlier threshold for determining if an AZ is an outlier for latency or faults."
8944
+ "summary": "The outlier threshold for determining if an AZ is an outlier for latency."
8886
8945
  },
8887
8946
  "immutable": true,
8888
8947
  "locationInModule": {
8889
8948
  "filename": "src/services/props/InstrumentedServiceMultiAZObservabilityProps.ts",
8890
- "line": 47
8949
+ "line": 81
8891
8950
  },
8892
- "name": "outlierThreshold",
8951
+ "name": "latencyOutlierThreshold",
8893
8952
  "optional": true,
8894
8953
  "type": {
8895
8954
  "primitive": "number"
@@ -8898,6 +8957,39 @@
8898
8957
  ],
8899
8958
  "symbolId": "src/services/props/InstrumentedServiceMultiAZObservabilityProps:InstrumentedServiceMultiAZObservabilityProps"
8900
8959
  },
8960
+ "@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation": {
8961
+ "assembly": "@cdklabs/multi-az-observability",
8962
+ "docs": {
8963
+ "stability": "experimental",
8964
+ "summary": "The latency metric aggregation to use for latency outlier detection."
8965
+ },
8966
+ "fqn": "@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation",
8967
+ "kind": "enum",
8968
+ "locationInModule": {
8969
+ "filename": "src/outlier-detection/LatencyOutlierMetricAggregation.ts",
8970
+ "line": 4
8971
+ },
8972
+ "members": [
8973
+ {
8974
+ "docs": {
8975
+ "remarks": "This option works\nwith all outlier detection algorithms",
8976
+ "stability": "experimental",
8977
+ "summary": "This option will use the count of the number of requests exceeding a latency threshold to make an outlier comparison."
8978
+ },
8979
+ "name": "COUNT"
8980
+ },
8981
+ {
8982
+ "docs": {
8983
+ "remarks": "For example,\nAZ1: p99 = 125ms\nAZ2: p99 = 130ms\nAZ3: p99 = 250ms\n\nThese values will be compared using the provided outlier detection algorithm. This\noption is not compatible with the STATIC outlier detection algorithm.",
8984
+ "stability": "experimental",
8985
+ "summary": "This option will use the value of your provided latency statistic, like p99, and the value of the latency in each AZ will be compared."
8986
+ },
8987
+ "name": "VALUE"
8988
+ }
8989
+ ],
8990
+ "name": "LatencyOutlierMetricAggregation",
8991
+ "symbolId": "src/outlier-detection/LatencyOutlierMetricAggregation:LatencyOutlierMetricAggregation"
8992
+ },
8901
8993
  "@cdklabs/multi-az-observability.MetricDimensions": {
8902
8994
  "assembly": "@cdklabs/multi-az-observability",
8903
8995
  "docs": {
@@ -11628,6 +11720,6 @@
11628
11720
  "symbolId": "src/services/props/ServiceProps:ServiceProps"
11629
11721
  }
11630
11722
  },
11631
- "version": "0.0.1-alpha.41",
11632
- "fingerprint": "Vxj8ZrNtuSp+kaHwEZQ+5UtmgvKeKlCCSKgTrD1ZnQ4="
11723
+ "version": "0.0.1-alpha.42",
11724
+ "fingerprint": "43PnJDqyt28uoN9taTjj08WZ8atmp3/UR2D7MHHKO5c="
11633
11725
  }
package/API.md CHANGED
@@ -1570,25 +1570,16 @@ const instrumentedServiceMultiAZObservabilityProps: InstrumentedServiceMultiAZOb
1570
1570
 
1571
1571
  | **Name** | **Type** | **Description** |
1572
1572
  | --- | --- | --- |
1573
- | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.outlierDetectionAlgorithm">outlierDetectionAlgorithm</a></code> | <code><a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a></code> | The algorithm to use for performing outlier detection. |
1574
1573
  | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.service">service</a></code> | <code><a href="#@cdklabs/multi-az-observability.IService">IService</a></code> | The service that the alarms and dashboards are being crated for. |
1575
1574
  | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.assetsBucketParameterName">assetsBucketParameterName</a></code> | <code>string</code> | If you are not using a static bucket to deploy assets, for example you are synthing this and it gets uploaded to a bucket whose name is unknown to you (maybe used as part of a central CI/CD system) and is provided as a parameter to your stack, specify that parameter name here. |
1576
1575
  | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.assetsBucketPrefixParameterName">assetsBucketPrefixParameterName</a></code> | <code>string</code> | If you are not using a static bucket to deploy assets, for example you are synthing this and it gets uploaded to a bucket that uses a prefix that is unknown to you (maybe used as part of a central CI/CD system) and is provided as a parameter to your stack, specify that parameter name here. |
1576
+ | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.availabilityOutlierDetectionAlgorithm">availabilityOutlierDetectionAlgorithm</a></code> | <code><a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a></code> | The algorithm to use for performing outlier detection for availability metrics. |
1577
+ | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.availabilityOutlierThreshold">availabilityOutlierThreshold</a></code> | <code>number</code> | The outlier threshold for determining if an AZ is an outlier for faults. |
1577
1578
  | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.createDashboards">createDashboards</a></code> | <code>boolean</code> | Indicates whether to create per operation and overall service dashboards. |
1578
1579
  | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.interval">interval</a></code> | <code>aws-cdk-lib.Duration</code> | The interval used in the dashboard, defaults to 60 minutes. |
1579
- | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.outlierThreshold">outlierThreshold</a></code> | <code>number</code> | The outlier threshold for determining if an AZ is an outlier for latency or faults. |
1580
-
1581
- ---
1582
-
1583
- ##### `outlierDetectionAlgorithm`<sup>Required</sup> <a name="outlierDetectionAlgorithm" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.outlierDetectionAlgorithm"></a>
1584
-
1585
- ```typescript
1586
- public readonly outlierDetectionAlgorithm: OutlierDetectionAlgorithm;
1587
- ```
1588
-
1589
- - *Type:* <a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a>
1590
-
1591
- The algorithm to use for performing outlier detection.
1580
+ | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierDetectionAlgorithm">latencyOutlierDetectionAlgorithm</a></code> | <code><a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a></code> | The algorithm to use for performing outlier detection for latency metrics. |
1581
+ | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierMetricAggregation">latencyOutlierMetricAggregation</a></code> | <code><a href="#@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation">LatencyOutlierMetricAggregation</a></code> | The metric for latency to use in outlier detection, which means whether the algorithm uses a count of requests exceeding your latency threshold or whether it uses the actual latency values at your latency alarm threshold statistic. |
1582
+ | <code><a href="#@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierThreshold">latencyOutlierThreshold</a></code> | <code>number</code> | The outlier threshold for determining if an AZ is an outlier for latency. |
1592
1583
 
1593
1584
  ---
1594
1585
 
@@ -1643,6 +1634,52 @@ value for this property.
1643
1634
 
1644
1635
  ---
1645
1636
 
1637
+ ##### `availabilityOutlierDetectionAlgorithm`<sup>Optional</sup> <a name="availabilityOutlierDetectionAlgorithm" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.availabilityOutlierDetectionAlgorithm"></a>
1638
+
1639
+ ```typescript
1640
+ public readonly availabilityOutlierDetectionAlgorithm: OutlierDetectionAlgorithm;
1641
+ ```
1642
+
1643
+ - *Type:* <a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a>
1644
+ - *Default:* OutlierDetectionAlgorithm.STATIC
1645
+
1646
+ The algorithm to use for performing outlier detection for availability metrics.
1647
+
1648
+ ** Currently only STATIC is supported **
1649
+
1650
+ ---
1651
+
1652
+ ##### `availabilityOutlierThreshold`<sup>Optional</sup> <a name="availabilityOutlierThreshold" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.availabilityOutlierThreshold"></a>
1653
+
1654
+ ```typescript
1655
+ public readonly availabilityOutlierThreshold: number;
1656
+ ```
1657
+
1658
+ - *Type:* number
1659
+ - *Default:* Depends on the outlier detection algorithm selected
1660
+
1661
+ The outlier threshold for determining if an AZ is an outlier for faults.
1662
+
1663
+ This number is interpreted
1664
+ differently for different outlier algorithms. When used with
1665
+ STATIC, the number should be between 0 and 1 to represent the
1666
+ percentage of errors (like .7) that an AZ must be responsible
1667
+ for to be considered an outlier. When used with CHI_SQUARED, it
1668
+ represents the p value that indicates statistical significance, like
1669
+ 0.05 which means the skew has less than or equal to a 5% chance of
1670
+ occuring. When used with Z_SCORE it indicates how many standard
1671
+ deviations to evaluate for an AZ being an outlier, typically 3 is
1672
+ standard for Z_SCORE.
1673
+
1674
+ Standard defaults based on the outlier detection algorithm:
1675
+ STATIC: 0.7
1676
+ CHI_SQUARED: 0.05
1677
+ Z_SCORE: 3
1678
+ IQR: 1.5
1679
+ MAD: 3
1680
+
1681
+ ---
1682
+
1646
1683
  ##### `createDashboards`<sup>Optional</sup> <a name="createDashboards" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.createDashboards"></a>
1647
1684
 
1648
1685
  ```typescript
@@ -1669,16 +1706,44 @@ The interval used in the dashboard, defaults to 60 minutes.
1669
1706
 
1670
1707
  ---
1671
1708
 
1672
- ##### `outlierThreshold`<sup>Optional</sup> <a name="outlierThreshold" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.outlierThreshold"></a>
1709
+ ##### `latencyOutlierDetectionAlgorithm`<sup>Optional</sup> <a name="latencyOutlierDetectionAlgorithm" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierDetectionAlgorithm"></a>
1710
+
1711
+ ```typescript
1712
+ public readonly latencyOutlierDetectionAlgorithm: OutlierDetectionAlgorithm;
1713
+ ```
1714
+
1715
+ - *Type:* <a href="#@cdklabs/multi-az-observability.OutlierDetectionAlgorithm">OutlierDetectionAlgorithm</a>
1716
+ - *Default:* OutlierDetectionAlgorithm.STATIC
1717
+
1718
+ The algorithm to use for performing outlier detection for latency metrics.
1719
+
1720
+ ** Currently only STATIC is supported **
1721
+
1722
+ ---
1723
+
1724
+ ##### `latencyOutlierMetricAggregation`<sup>Optional</sup> <a name="latencyOutlierMetricAggregation" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierMetricAggregation"></a>
1673
1725
 
1674
1726
  ```typescript
1675
- public readonly outlierThreshold: number;
1727
+ public readonly latencyOutlierMetricAggregation: LatencyOutlierMetricAggregation;
1728
+ ```
1729
+
1730
+ - *Type:* <a href="#@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation">LatencyOutlierMetricAggregation</a>
1731
+ - *Default:* LatencyOutlierMetric.COUNT
1732
+
1733
+ The metric for latency to use in outlier detection, which means whether the algorithm uses a count of requests exceeding your latency threshold or whether it uses the actual latency values at your latency alarm threshold statistic.
1734
+
1735
+ ---
1736
+
1737
+ ##### `latencyOutlierThreshold`<sup>Optional</sup> <a name="latencyOutlierThreshold" id="@cdklabs/multi-az-observability.InstrumentedServiceMultiAZObservabilityProps.property.latencyOutlierThreshold"></a>
1738
+
1739
+ ```typescript
1740
+ public readonly latencyOutlierThreshold: number;
1676
1741
  ```
1677
1742
 
1678
1743
  - *Type:* number
1679
1744
  - *Default:* Depends on the outlier detection algorithm selected
1680
1745
 
1681
- The outlier threshold for determining if an AZ is an outlier for latency or faults.
1746
+ The outlier threshold for determining if an AZ is an outlier for latency.
1682
1747
 
1683
1748
  This number is interpreted
1684
1749
  differently for different outlier algorithms. When used with
@@ -8574,6 +8639,44 @@ average for all AZs. This is the default.
8574
8639
  ---
8575
8640
 
8576
8641
 
8642
+ ### LatencyOutlierMetricAggregation <a name="LatencyOutlierMetricAggregation" id="@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation"></a>
8643
+
8644
+ The latency metric aggregation to use for latency outlier detection.
8645
+
8646
+ #### Members <a name="Members" id="Members"></a>
8647
+
8648
+ | **Name** | **Description** |
8649
+ | --- | --- |
8650
+ | <code><a href="#@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation.COUNT">COUNT</a></code> | This option will use the count of the number of requests exceeding a latency threshold to make an outlier comparison. |
8651
+ | <code><a href="#@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation.VALUE">VALUE</a></code> | This option will use the value of your provided latency statistic, like p99, and the value of the latency in each AZ will be compared. |
8652
+
8653
+ ---
8654
+
8655
+ ##### `COUNT` <a name="COUNT" id="@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation.COUNT"></a>
8656
+
8657
+ This option will use the count of the number of requests exceeding a latency threshold to make an outlier comparison.
8658
+
8659
+ This option works
8660
+ with all outlier detection algorithms
8661
+
8662
+ ---
8663
+
8664
+
8665
+ ##### `VALUE` <a name="VALUE" id="@cdklabs/multi-az-observability.LatencyOutlierMetricAggregation.VALUE"></a>
8666
+
8667
+ This option will use the value of your provided latency statistic, like p99, and the value of the latency in each AZ will be compared.
8668
+
8669
+ For example,
8670
+ AZ1: p99 = 125ms
8671
+ AZ2: p99 = 130ms
8672
+ AZ3: p99 = 250ms
8673
+
8674
+ These values will be compared using the provided outlier detection algorithm. This
8675
+ option is not compatible with the STATIC outlier detection algorithm.
8676
+
8677
+ ---
8678
+
8679
+
8577
8680
  ### OutlierDetectionAlgorithm <a name="OutlierDetectionAlgorithm" id="@cdklabs/multi-az-observability.OutlierDetectionAlgorithm"></a>
8578
8681
 
8579
8682
  Available algorithms for performing outlier detection.
@@ -11,6 +11,7 @@ import { IOperationMetricDetails } from '../services/IOperationMetricDetails';
11
11
  import { OutlierDetectionAlgorithm } from '../utilities/OutlierDetectionAlgorithm';
12
12
  import { IOperationAvailabilityMetricDetails } from '../services/IOperationAvailabilityMetricDetails';
13
13
  import { IOperationLatencyMetricDetails } from '../services/IOperationLatencyMetricDetails';
14
+ import { LatencyOutlierMetricAggregation } from '../outlier-detection/LatencyOutlierMetricAggregation';
14
15
  /**
15
16
  * Class used to create availability and latency alarms and Contributor Insight rules
16
17
  */
@@ -77,7 +78,7 @@ export declare class AvailabilityAndLatencyAlarmsAndRules {
77
78
  static createZonalFaultRateOutlierAlarmForNatGW(scope: IConstruct, natGateways: {
78
79
  [key: string]: CfnNatGateway[];
79
80
  }, availabilityZoneId: string, outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, azMapper: IAvailabilityZoneMapper, counter: number, evaluationPeriods: number, datapointsToAlarm: number, period: Duration, nameSuffix?: string): IAlarm;
80
- static createZonalHighLatencyOutlierAlarm(scope: IConstruct, metricDetails: IOperationLatencyMetricDetails, availabilityZoneId: string, allAvailabilityZoneIds: string[], outlierThreshold: number, outlierDetectionFunction: IFunction, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, counter: number, nameSuffix?: string): IAlarm;
81
+ static createZonalHighLatencyOutlierAlarm(scope: IConstruct, metricDetails: IOperationLatencyMetricDetails, availabilityZoneId: string, allAvailabilityZoneIds: string[], outlierThreshold: number, outlierDetectionFunction: IFunction, outlierMetric: LatencyOutlierMetricAggregation, outlierDetectionAlgorithm: OutlierDetectionAlgorithm, counter: number, nameSuffix?: string): IAlarm;
81
82
  static createZonalHighLatencyStaticOutlierAlarm(scope: Construct, metricDetails: IOperationLatencyMetricDetails, availabilityZone: string, availabilityZoneId: string, counter: number, outlierThreshold: number, nameSuffix?: string): IAlarm;
82
83
  static createZonalHighLatencyStaticOutlierAlarmForCanaries(scope: Construct, metricDetails: IOperationLatencyMetricDetails, availabilityZone: string, availabilityZoneId: string, availabilityZones: string[], counter: number, outlierThreshold: number, nameSuffix?: string): IAlarm;
83
84
  /**