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(stepfunctions): specify line colors for Step Functions Executions graph to ensure failed executions don't show as green #562

Merged
merged 1 commit into from
Aug 23, 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
12 changes: 12 additions & 0 deletions lib/common/widget/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ export const ErrorColor = "#d13212";
* color to indicate neutral information
*/
export const NeutralColor = "#999999";
/**
* color to indicate throttled state
*/
export const ThrottledColor = "#5928ed";
/**
* color to indicate a started state (e.g. Step Function executions)
*/
export const StartedColor = "#0073e6";
/**
* color to indicate a timed out state
*/
export const TimedOutColor = "#333333";
18 changes: 12 additions & 6 deletions lib/monitoring/aws-step-functions/StepFunctionMetricFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ import { IStateMachine } from "aws-cdk-lib/aws-stepfunctions";
import {
BaseMetricFactory,
BaseMetricFactoryProps,
ErrorColor,
HealthyMetricColor,
MetricFactory,
MetricStatistic,
RateComputationMethod,
StartedColor,
ThrottledColor,
TimedOutColor,
WarningColor,
} from "../../common";

const Namespace = "AWS/States";
Expand Down Expand Up @@ -83,7 +89,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Failed",
this.dimensionsMap,
undefined,
ErrorColor,
Namespace,
undefined,
this.region,
Expand All @@ -106,7 +112,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Timeout",
this.dimensionsMap,
undefined,
TimedOutColor,
Namespace,
undefined,
this.region,
Expand All @@ -120,7 +126,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Throttled",
this.dimensionsMap,
undefined,
ThrottledColor,
Namespace,
undefined,
this.region,
Expand All @@ -134,7 +140,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Aborted",
this.dimensionsMap,
undefined,
WarningColor,
Namespace,
undefined,
this.region,
Expand All @@ -148,7 +154,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Started",
this.dimensionsMap,
undefined,
StartedColor,
Namespace,
undefined,
this.region,
Expand All @@ -162,7 +168,7 @@ export class StepFunctionMetricFactory extends BaseMetricFactory<StepFunctionMet
MetricStatistic.SUM,
"Succeeded",
this.dimensionsMap,
undefined,
HealthyMetricColor,
Namespace,
undefined,
this.region,
Expand Down
26 changes: 13 additions & 13 deletions test/facade/__snapshots__/MonitoringAspect.test.ts.snap

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

Loading