diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/detectionConfig.ts b/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/detectionConfig.ts index 62c462e92f26..e909500c1f94 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/detectionConfig.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/detectionConfig.ts @@ -73,7 +73,7 @@ async function createDetectionConfig( sensitivity: 50, anomalyDetectorDirection: "Both", suppressCondition: { - minNumber: 50, + minNumber: 5, minRatio: 50 } }, diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/seriesData.ts b/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/seriesData.ts index a6cee81fd8ce..3390b6a2c053 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/seriesData.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples-dev/seriesData.ts @@ -81,7 +81,7 @@ async function getMetricSeriesData(client: MetricsAdvisorClient, metricId: strin for (const series of result) { console.log(series.definition); - if (series.timestamps?.length) + if (series.timestamps && series.timestamps.length) for (let i = 0; i < series.timestamps!.length; i++) { console.log(` ${series.timestamps![i]}`); console.log(` ${series.values![i]}`); diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/detectionConfig.js b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/detectionConfig.js index 77cf92447b5e..98ae78dbf4c5 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/detectionConfig.js +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/detectionConfig.js @@ -62,7 +62,7 @@ async function createDetectionConfig(adminClient, metricId) { sensitivity: 50, anomalyDetectorDirection: "Both", suppressCondition: { - minNumber: 50, + minNumber: 5, minRatio: 50 } }, diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/seriesData.js b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/seriesData.js index e1258231dd9b..512db122b41e 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/seriesData.js +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/javascript/seriesData.js @@ -80,7 +80,7 @@ async function getMetricSeriesData(client, metricId) { for (const series of result) { console.log(series.definition); - if (series.timestamps?.length) + if (series.timestamps && series.timestamps.length) for (let i = 0; i < series.timestamps.length; i++) { console.log(` ${series.timestamps[i]}`); console.log(` ${series.values[i]}`); diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/detectionConfig.ts b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/detectionConfig.ts index 07c2ee7be3e8..bb6ef77bd740 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/detectionConfig.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/detectionConfig.ts @@ -72,7 +72,7 @@ async function createDetectionConfig( sensitivity: 50, anomalyDetectorDirection: "Both", suppressCondition: { - minNumber: 50, + minNumber: 5, minRatio: 50 } }, diff --git a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/seriesData.ts b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/seriesData.ts index 6cb67fea44a3..d834bb431939 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/seriesData.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/samples/v1/typescript/src/seriesData.ts @@ -80,7 +80,7 @@ async function getMetricSeriesData(client: MetricsAdvisorClient, metricId: strin for (const series of result) { console.log(series.definition); - if (series.timestamps?.length) + if (series.timestamps && series.timestamps.length) for (let i = 0; i < series.timestamps!.length; i++) { console.log(` ${series.timestamps![i]}`); console.log(` ${series.values![i]}`);