Limit per_service query to transaction documents (#143138)

This commit is contained in:
Colton Myers 2022-10-11 16:22:27 -06:00 committed by GitHub
parent 4ec846cac4
commit d260172a0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1159,13 +1159,16 @@ export const tasks: TelemetryTask[] = [
name: 'per_service',
executor: async ({ indices, search }) => {
const response = await search({
index: [indices.metric],
index: [indices.transaction],
body: {
size: 0,
timeout,
query: {
bool: {
filter: [{ range: { '@timestamp': { gte: 'now-1h' } } }],
filter: [
{ range: { '@timestamp': { gte: 'now-1h' } } },
{ term: { [PROCESSOR_EVENT]: ProcessorEvent.transaction } },
],
},
},
aggs: {