diff --git a/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts b/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts index 29a1c36675c11..92411e79ce371 100644 --- a/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts +++ b/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts @@ -25,7 +25,7 @@ export const errorCountParamsSchema = schema.object({ threshold: schema.number(), serviceName: schema.maybe(schema.string()), environment: schema.string(), - groupBy: schema.maybe(schema.arrayOf(schema.string())), + groupBy: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 10 })), errorGroupingKey: schema.maybe(schema.string()), useKqlFilter: schema.maybe(schema.boolean()), searchConfiguration: schema.maybe(searchConfigurationSchema), @@ -44,7 +44,7 @@ export const transactionDurationParamsSchema = schema.object({ schema.literal(AggregationType.P99), ]), environment: schema.string(), - groupBy: schema.maybe(schema.arrayOf(schema.string())), + groupBy: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 10 })), useKqlFilter: schema.maybe(schema.boolean()), searchConfiguration: schema.maybe(searchConfigurationSchema), }); @@ -67,7 +67,7 @@ export const anomalyParamsSchema = schema.object({ schema.literal(ML_ANOMALY_SEVERITY.MINOR), schema.literal(ML_ANOMALY_SEVERITY.WARNING), ]), - anomalyDetectorTypes: schema.maybe(schema.arrayOf(detectorsSchema, { minSize: 1 })), + anomalyDetectorTypes: schema.maybe(schema.arrayOf(detectorsSchema, { minSize: 1, maxSize: 3 })), }); export const transactionErrorRateParamsSchema = schema.object({ @@ -78,7 +78,7 @@ export const transactionErrorRateParamsSchema = schema.object({ transactionName: schema.maybe(schema.string()), serviceName: schema.maybe(schema.string()), environment: schema.string(), - groupBy: schema.maybe(schema.arrayOf(schema.string())), + groupBy: schema.maybe(schema.arrayOf(schema.string(), { maxSize: 10 })), useKqlFilter: schema.maybe(schema.boolean()), searchConfiguration: schema.maybe(searchConfigurationSchema), }); diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts index f795bd25295bc..9e7c0b8867e53 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts @@ -19,7 +19,7 @@ const querySchema = schema.object({ timeFrom: schema.number(), timeTo: schema.number(), functionName: schema.string(), - serviceNames: schema.arrayOf(schema.string()), + serviceNames: schema.arrayOf(schema.string(), { maxSize: 10 }), }); type QuerySchemaType = TypeOf;