Skip to content

Commit

Permalink
Add error grouping key in alert id
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatticha committed Apr 20, 2023
1 parent 3adf28a commit 9938b11
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export function registerErrorCountRuleType({
{ term: { [PROCESSOR_EVENT]: ProcessorEvent.error } },
...termQuery(SERVICE_NAME, ruleParams.serviceName),
...termQuery(ERROR_GROUP_ID, ruleParams.errorGroupingKey),
...termQuery(SERVICE_NAME, ruleParams.serviceName),
...environmentQuery(ruleParams.environment),
],
},
Expand Down Expand Up @@ -168,7 +167,12 @@ export function registerErrorCountRuleType({
windowUnit: ruleParams.windowUnit,
});

const id = [ApmRuleType.ErrorCount, serviceName, environment]
const id = [
ApmRuleType.ErrorCount,
serviceName,
environment,
ruleParams.errorGroupingKey,
]
.filter((name) => name)
.join('_');

Expand Down

0 comments on commit 9938b11

Please sign in to comment.