[APM] Update usage of apmAlertsClient (#163827)

Co-authored-by: Achyut Jhunjhunwala <achyut.jhunjhunwala@elastic.co>
This commit is contained in:
Dario Gieselaar 2023-08-14 18:43:59 +02:00 committed by GitHub
parent 78250515ff
commit 0ce9d335bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,16 +285,18 @@ export async function getApmServiceSummary({
}),
apmAlertsClient.search({
size: 100,
// @ts-expect-error types for apm alerts client needs to be reviewed
query: {
bool: {
filter: [
...termQuery(ALERT_RULE_PRODUCER, 'apm'),
...termQuery(ALERT_STATUS, ALERT_STATUS_ACTIVE),
...rangeQuery(start, end),
...termQuery(SERVICE_NAME, serviceName),
...environmentQuery(environment),
],
track_total_hits: false,
body: {
query: {
bool: {
filter: [
...termQuery(ALERT_RULE_PRODUCER, 'apm'),
...termQuery(ALERT_STATUS, ALERT_STATUS_ACTIVE),
...rangeQuery(start, end),
...termQuery(SERVICE_NAME, serviceName),
...environmentQuery(environment),
],
},
},
},
}),