diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.test.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.test.ts index 1066eb8a987d8..cebf71f1bad97 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.test.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.test.ts @@ -65,7 +65,7 @@ describe('registerTransactionDurationRuleType', () => { 'Avg. latency is 5,500 ms in the last 5 mins for opbeans-java. Alert when > 3,000 ms.', transactionType: 'request', serviceName: 'opbeans-java', - threshold: 3000000, + threshold: 3000, triggerValue: '5,500 ms', viewInAppUrl: 'http://localhost:5601/eyr/app/apm/services/opbeans-java?transactionType=request&environment=ENVIRONMENT_ALL', diff --git a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts index 75e1aef357088..803945568494b 100644 --- a/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts +++ b/x-pack/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts @@ -281,7 +281,7 @@ export function registerTransactionDurationRuleType({ [TRANSACTION_TYPE]: transactionType, [PROCESSOR_EVENT]: ProcessorEvent.transaction, [ALERT_EVALUATION_VALUE]: transactionDuration, - [ALERT_EVALUATION_THRESHOLD]: thresholdMicroseconds, + [ALERT_EVALUATION_THRESHOLD]: ruleParams.threshold, [ALERT_REASON]: reason, ...sourceFields, }, @@ -292,7 +292,7 @@ export function registerTransactionDurationRuleType({ interval: `${ruleParams.windowSize}${ruleParams.windowUnit}`, reason, serviceName, - threshold: thresholdMicroseconds, + threshold: ruleParams.threshold, transactionType, triggerValue: transactionDurationFormatted, viewInAppUrl,