Skip to content

Commit

Permalink
address PR feedback and fixes checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed Oct 26, 2022
1 parent 531bc6e commit f17ffca
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/common/service_groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function validateServiceGroupKuery(kuery: string) {
isValid: false,
isParsingError: false,
message: i18n.translate(
'xpack.apm.serviceGroups.selectServicesForm.title',
'xpack.apm.serviceGroups.invalidFields.message',
{
defaultMessage:
'Query filter for service group does not support fields [{unsupportedFieldNames}]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export function SelectServices({
const { isValid, isParsingError, message } =
validateServiceGroupKuery(stagedKuery);
if (isValid || isParsingError) {
if (kueryValidationMessage !== '') {
setKueryValidationMessage('');
}
setKueryValidationMessage('');
} else {
setKueryValidationMessage(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export async function getAnomalousEventSourceFields({
index,
body: {
size: 0,
track_total_hits: false,
query: {
bool: {
filter: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
PROCESSOR_EVENT,
SERVICE_ENVIRONMENT,
SERVICE_NAME,
TRANSACTION_DURATION,
} from '../../../../../common/elasticsearch_fieldnames';
import { environmentQuery } from '../../../../../common/utils/environment_query';
import { getApmIndices } from '../../../settings/apm_indices/get_apm_indices';
Expand Down Expand Up @@ -123,7 +124,8 @@ export function registerErrorCountRuleType({
missing: ENVIRONMENT_NOT_DEFINED.value,
},
],
size: 10000,
size: 1000,
order: { [TRANSACTION_DURATION]: 'desc' as const },
},
aggs: getSourceFieldsAgg(),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ describe('registerTransactionDurationRuleType', () => {
},
},
aggregations: {
environments: {
series: {
buckets: [
{
key: 'ENVIRONMENT_NOT_DEFINED',
key: ['opbeans-java', 'ENVIRONMENT_NOT_DEFINED', 'request'],
avgLatency: {
value: 5500000,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
SERVICE_NAME,
TRANSACTION_TYPE,
SERVICE_ENVIRONMENT,
TRANSACTION_DURATION,
} from '../../../../../common/elasticsearch_fieldnames';
import {
ENVIRONMENT_NOT_DEFINED,
Expand Down Expand Up @@ -159,7 +160,8 @@ export function registerTransactionDurationRuleType({
},
{ field: TRANSACTION_TYPE },
],
size: 10000,
size: 1000,
order: { [TRANSACTION_DURATION]: 'desc' as const },
},
aggs: {
...averageOrPercentileAgg({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
SERVICE_ENVIRONMENT,
SERVICE_NAME,
TRANSACTION_TYPE,
TRANSACTION_DURATION,
} from '../../../../../common/elasticsearch_fieldnames';
import { EventOutcome } from '../../../../../common/event_outcome';
import { asDecimalOrInteger } from '../../../../../common/utils/formatters';
Expand Down Expand Up @@ -154,7 +155,8 @@ export function registerTransactionErrorRateRuleType({
},
{ field: TRANSACTION_TYPE },
],
size: 10000,
size: 1000,
order: { [TRANSACTION_DURATION]: 'desc' as const },
},
aggs: {
outcomes: {
Expand Down

0 comments on commit f17ffca

Please sign in to comment.