Skip to content

Commit

Permalink
fix(MetricFactory): more specific return type for createMetricSearch
Browse files Browse the repository at this point in the history
Fixes #583
  • Loading branch information
echeung-amzn committed Oct 24, 2024
1 parent 3c5ec1b commit 1b54d60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Multiple metrics cannot be rendered with anomaly detection in a single widget du
```ts
monitorCustom({
title: "Metric with anomaly detection",
metrics: [
metricGroups: [
{
metric: m1,
anomalyDetectionStandardDeviationToRender: 3
Expand All @@ -216,7 +216,7 @@ Adding an alarm:
```ts
monitorCustom({
title: "Metric with anomaly detection and alarm",
metrics: [
metricGroups: [
{
metric: m1,
alarmFriendlyName: "MetricWithAnomalyDetectionAlarm",
Expand All @@ -238,7 +238,7 @@ monitorCustom({
```ts
monitorCustom({
title: "Metric search",
metrics: [
metricGroups: [
{
searchQuery: "My.Prefix.",
dimensionsMap: {
Expand Down
2 changes: 1 addition & 1 deletion lib/common/metric/MetricFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class MetricFactory {
period?: Duration,
region?: string,
account?: string,
): IMetric {
): MathExpression {
const finalPeriod =
period ?? this.globalDefaults.period ?? DefaultMetricPeriod;
const searchNamespace = this.getNamespaceWithFallback(namespace);
Expand Down

0 comments on commit 1b54d60

Please sign in to comment.