Skip to content

Commit

Permalink
Record transaction duration alerts in microseconds (#112366)
Browse files Browse the repository at this point in the history
  • Loading branch information
smith authored Sep 16, 2021
1 parent 9eb74be commit 506cfcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('registerTransactionDurationAlertType', () => {
transactionType: 'request',
serviceName: 'opbeans-java',
environment: 'Not defined',
threshold: 3000,
threshold: 3000000,
triggerValue: '5,500 ms',
interval: `5m`,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
},
Expand All @@ -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}`,
});
Expand Down

0 comments on commit 506cfcf

Please sign in to comment.