Skip to content

Commit

Permalink
fix pagerduty integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed Apr 4, 2024
1 parent 6c69129 commit d213381
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bin/stacks/api-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import { Construct } from 'constructs';
import * as path from 'path';
import { KmsStack } from './kms-stack';

import { HardQuoteMetricDimension, Metric, SoftQuoteMetricDimension } from '../../lib/entities';
import {
HardQuoteMetricDimension,
Metric,
SoftQuoteMetricDimension,
UniswapXParamServiceMetricDimension,
} from '../../lib/entities';
import { STAGE } from '../../lib/util/stage';
import { SERVICE_NAME } from '../constants';
import { AnalyticsStack } from './analytics-stack';
Expand Down Expand Up @@ -587,7 +592,7 @@ export class APIStack extends cdk.Stack {
this,
`${dimension.Service}-SEV2-RFQ-NonQuoteRate`,
{
alarmName: `${dimension.Service}-SEV2-RFQ-NonQuoteRate`,
alarmName: `${UniswapXParamServiceMetricDimension.Service}-SEV2-RFQ-NonQuoteRate-${dimension.Service}`,
metric: rfqOverallNonQuoteMetric,
threshold: 85,
comparisonOperator: aws_cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
Expand All @@ -596,7 +601,7 @@ export class APIStack extends cdk.Stack {
);

const quoteLatencyAlarmSev3 = new aws_cloudwatch.Alarm(this, `${dimension.Service}-SEV3-QuoteLatency`, {
alarmName: `${dimension.Service}-SEV3-QuoteLatency`,
alarmName: `${UniswapXParamServiceMetricDimension.Service}-SEV3-QuoteLatency-${dimension.Service}`,
metric: new aws_cloudwatch.Metric({
namespace: 'Uniswap',
metricName: `${Metric.QUOTE_LATENCY}`,
Expand Down Expand Up @@ -632,15 +637,15 @@ export class APIStack extends cdk.Stack {
});

const quotePostErrorAlarmSev3 = new aws_cloudwatch.Alarm(this, `${dimension.Service}-SEV3-PostErrorRate`, {
alarmName: `${dimension.Service}-SEV3-PostErrorRate`,
alarmName: `${UniswapXParamServiceMetricDimension.Service}-SEV3-PostErrorRate-${dimension.Service}`,
metric: quotePostErrorMetric,
evaluationPeriods: 3,
threshold: 10,
comparisonOperator: aws_cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
});

const quotePostErrorAlarmSev2 = new aws_cloudwatch.Alarm(this, `${dimension.Service}-SEV2-PostErrorRate`, {
alarmName: `${dimension.Service}-SEV2-PostErrorRate`,
alarmName: `${UniswapXParamServiceMetricDimension.Service}-SEV2-PostErrorRate-${dimension.Service}`,
metric: quotePostErrorMetric,
evaluationPeriods: 3,
threshold: 20,
Expand Down

0 comments on commit d213381

Please sign in to comment.