Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MetricFactory): more specific return type for createMetricSearch #584

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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