Record transaction duration alerts in microseconds (#112366)

This commit is contained in:
Nathan L Smith 2021-09-16 08:19:50 -05:00 committed by GitHub
parent 9eb74bebad
commit 506cfcf063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ describe('registerTransactionDurationAlertType', () => {
transactionType: 'request',
serviceName: 'opbeans-java',
environment: 'Not defined',
threshold: 3000,
threshold: 3000000,
triggerValue: '5,500 ms',
interval: `5m`,
});

View file

@ -201,11 +201,11 @@ export function registerTransactionDurationAlertType({
[TRANSACTION_TYPE]: alertParams.transactionType,
[PROCESSOR_EVENT]: ProcessorEvent.transaction,
[ALERT_EVALUATION_VALUE]: transactionDuration,
[ALERT_EVALUATION_THRESHOLD]: alertParams.threshold,
[ALERT_EVALUATION_THRESHOLD]: thresholdMicroseconds,
[ALERT_REASON]: formatTransactionDurationReason({
measured: transactionDuration,
serviceName: alertParams.serviceName,
threshold: alertParams.threshold,
threshold: thresholdMicroseconds,
asDuration,
}),
},
@ -214,7 +214,7 @@ export function registerTransactionDurationAlertType({
transactionType: alertParams.transactionType,
serviceName: alertParams.serviceName,
environment: getEnvironmentLabel(alertParams.environment),
threshold: alertParams.threshold,
threshold: thresholdMicroseconds,
triggerValue: transactionDurationFormatted,
interval: `${alertParams.windowSize}${alertParams.windowUnit}`,
});