[9.0] [DOCS] Add APM rule parameter descriptions (#213186) (#214035)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[DOCS] Add APM rule parameter descriptions
(#213186)](https://github.com/elastic/kibana/pull/213186)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2025-03-11T23:55:21Z","message":"[DOCS]
Add APM rule parameter descriptions
(#213186)","sha":"86ddd8cf3a008354fc645ee8a6cd794bcaa6b7a1","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","documentation","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0"],"title":"[DOCS]
Add APM rule parameter
descriptions","number":213186,"url":"https://github.com/elastic/kibana/pull/213186","mergeCommit":{"message":"[DOCS]
Add APM rule parameter descriptions
(#213186)","sha":"86ddd8cf3a008354fc645ee8a6cd794bcaa6b7a1"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213186","number":213186,"mergeCommit":{"message":"[DOCS]
Add APM rule parameter descriptions
(#213186)","sha":"86ddd8cf3a008354fc645ee8a6cd794bcaa6b7a1"}}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
Kibana Machine 2025-03-12 12:37:03 +11:00 committed by GitHub
parent 0a4ba65a15
commit 053f69908f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 271 additions and 87 deletions

View file

@ -58227,27 +58227,30 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: |
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major
@ -58262,24 +58265,26 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: |
The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default:
@ -58293,8 +58298,12 @@ components:
- service.environment
- transaction.name
- error.grouping_key
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
description: |
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.
params_property_apm_transaction_duration:
required:
- windowSize
@ -58305,29 +58314,32 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default:
@ -58342,12 +58354,15 @@ components:
- service.environment
- transaction.type
- transaction.name
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
description: The type of aggregation to perform.
params_property_apm_transaction_error_rate:
required:
- windowSize

View file

@ -65612,27 +65612,30 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: |
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major
@ -65647,24 +65650,26 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: |
The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: |
The type of units for the time window: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default:
@ -65678,8 +65683,12 @@ components:
- service.environment
- transaction.name
- error.grouping_key
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
description: |
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.
params_property_apm_transaction_duration:
required:
- windowSize
@ -65690,29 +65699,32 @@ components:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: |
The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: |
The type of units for the time window. For example: minutes, hours, or days.
enum:
- m
- h
- d
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default:
@ -65727,12 +65739,15 @@ components:
- service.environment
- transaction.type
- transaction.name
description: |
Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
description: The type of aggregation to perform.
params_property_apm_transaction_error_rate:
required:
- windowSize

View file

@ -23,18 +23,43 @@ const detectorsSchema = schema.oneOf([
]);
export const anomalyParamsSchema = schema.object({
serviceName: schema.maybe(schema.string()),
transactionType: schema.maybe(schema.string()),
windowSize: schema.number(),
windowUnit: schema.string(),
environment: schema.string(),
anomalySeverityType: schema.oneOf([
schema.literal(ML_ANOMALY_SEVERITY.CRITICAL),
schema.literal(ML_ANOMALY_SEVERITY.MAJOR),
schema.literal(ML_ANOMALY_SEVERITY.MINOR),
schema.literal(ML_ANOMALY_SEVERITY.WARNING),
]),
anomalyDetectorTypes: schema.maybe(schema.arrayOf(detectorsSchema, { minSize: 1 })),
serviceName: schema.maybe(schema.string({ meta: { description: 'The service name from APM.' } })),
transactionType: schema.maybe(
schema.string({ meta: { description: 'The transaction type from APM.' } })
),
windowSize: schema.number({
meta: {
description:
'The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: { description: 'The type of units for the time window: minutes, hours, or days.' },
}),
environment: schema.string({ meta: { description: 'The environment from APM.' } }),
anomalySeverityType: schema.oneOf(
[
schema.literal(ML_ANOMALY_SEVERITY.CRITICAL),
schema.literal(ML_ANOMALY_SEVERITY.MAJOR),
schema.literal(ML_ANOMALY_SEVERITY.MINOR),
schema.literal(ML_ANOMALY_SEVERITY.WARNING),
],
{
meta: {
description:
'The severity of anomalies that result in an alert: critical, major, minor, or warning.',
},
}
),
anomalyDetectorTypes: schema.maybe(
schema.arrayOf(detectorsSchema, {
minSize: 1,
meta: {
description:
'The types of anomalies that are detected. For example, detect abnormal latency, throughput, or failed transaction rates.',
},
})
),
});
export type AnomalyRuleParams = TypeOf<typeof anomalyParamsSchema>;

View file

@ -11,14 +11,57 @@ import { TypeOf, schema } from '@kbn/config-schema';
import { searchConfigurationSchema } from '../common/search_configuration_schema';
export const errorCountParamsSchema = schema.object({
windowSize: schema.number(),
windowUnit: schema.string(),
threshold: schema.number(),
serviceName: schema.maybe(schema.string()),
environment: schema.string(),
groupBy: schema.maybe(schema.arrayOf(schema.string())),
errorGroupingKey: schema.maybe(schema.string()),
useKqlFilter: schema.maybe(schema.boolean()),
windowSize: schema.number({
meta: {
description:
'The time frame in which the errors must occur (in `windowUnit` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: { description: 'The type of units for the time window: minutes, hours, or days.' },
}),
threshold: schema.number({
meta: { description: 'The number of errors, which is the threshold for alerts.' },
}),
serviceName: schema.maybe(
schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific service.',
},
})
),
environment: schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific environment.',
},
}),
groupBy: schema.maybe(
schema.arrayOf(
schema.string({
meta: {
description:
'Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.',
},
})
)
),
errorGroupingKey: schema.maybe(
schema.string({
meta: {
description:
'Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.',
},
})
),
useKqlFilter: schema.maybe(
schema.boolean({
meta: {
description: 'A filter in Kibana Query Language (KQL) that limits the scope of the rule.',
},
})
),
searchConfiguration: schema.maybe(searchConfigurationSchema),
});

View file

@ -17,20 +17,59 @@ export enum AggregationType {
}
export const transactionDurationParamsSchema = schema.object({
serviceName: schema.maybe(schema.string()),
transactionType: schema.maybe(schema.string()),
transactionName: schema.maybe(schema.string()),
windowSize: schema.number(),
windowUnit: schema.string(),
threshold: schema.number(),
aggregationType: schema.oneOf([
schema.literal(AggregationType.Avg),
schema.literal(AggregationType.P95),
schema.literal(AggregationType.P99),
]),
environment: schema.string(),
groupBy: schema.maybe(schema.arrayOf(schema.string())),
useKqlFilter: schema.maybe(schema.boolean()),
serviceName: schema.maybe(
schema.string({ meta: { description: 'Filter the rule to apply to a specific service.' } })
),
transactionType: schema.maybe(
schema.string({
meta: { description: 'Filter the rule to apply to a specific transaction type.' },
})
),
transactionName: schema.maybe(
schema.string({
meta: { description: 'Filter the rule to apply to a specific transaction name.' },
})
),
windowSize: schema.number({
meta: {
description:
'The size of the time window (in `windowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.',
},
}),
windowUnit: schema.string({
meta: {
description: 'The type of units for the time window. For example: minutes, hours, or days.',
},
}),
threshold: schema.number({ meta: { description: 'The latency threshold value.' } }),
aggregationType: schema.oneOf(
[
schema.literal(AggregationType.Avg),
schema.literal(AggregationType.P95),
schema.literal(AggregationType.P99),
],
{ meta: { description: 'The type of aggregation to perform.' } }
),
environment: schema.string({
meta: { description: 'Filter the rule to apply to a specific environment.' },
}),
groupBy: schema.maybe(
schema.arrayOf(
schema.string({
meta: {
description:
'Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.',
},
})
)
),
useKqlFilter: schema.maybe(
schema.boolean({
meta: {
description: 'A Kibana Query Language (KQL) expression thats limits the scope of alerts.',
},
})
),
searchConfiguration: schema.maybe(searchConfigurationSchema),
});

View file

@ -1561,6 +1561,7 @@ Object {
"anomalyDetectorTypes": Object {
"flags": Object {
"default": [Function],
"description": "The types of anomalies that are detected. For example, detect abnormal latency, throughput, or failed transaction rates.",
"error": [Function],
"presence": "optional",
},
@ -1628,6 +1629,7 @@ Object {
},
"anomalySeverityType": Object {
"flags": Object {
"description": "The severity of anomalies that result in an alert: critical, major, minor, or warning.",
"error": [Function],
},
"matches": Array [
@ -1684,6 +1686,7 @@ Object {
},
"environment": Object {
"flags": Object {
"description": "The environment from APM.",
"error": [Function],
},
"rules": Array [
@ -1699,6 +1702,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "The service name from APM.",
"error": [Function],
"presence": "optional",
},
@ -1720,6 +1724,7 @@ Object {
"transactionType": Object {
"flags": Object {
"default": [Function],
"description": "The transaction type from APM.",
"error": [Function],
"presence": "optional",
},
@ -1740,12 +1745,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The size of the time window (in \`windowUnit\` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [
@ -1775,6 +1782,7 @@ Object {
"keys": Object {
"environment": Object {
"flags": Object {
"description": "Filter the errors coming from your application to apply the rule to a specific environment.",
"error": [Function],
},
"rules": Array [
@ -1790,6 +1798,7 @@ Object {
"errorGroupingKey": Object {
"flags": Object {
"default": [Function],
"description": "Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.",
"error": [Function],
"presence": "optional",
},
@ -1817,6 +1826,7 @@ Object {
"items": Array [
Object {
"flags": Object {
"description": "Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.",
"error": [Function],
"presence": "optional",
},
@ -1951,6 +1961,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the errors coming from your application to apply the rule to a specific service.",
"error": [Function],
"presence": "optional",
},
@ -1971,6 +1982,7 @@ Object {
},
"threshold": Object {
"flags": Object {
"description": "The number of errors, which is the threshold for alerts.",
"error": [Function],
},
"type": "number",
@ -1978,6 +1990,7 @@ Object {
"useKqlFilter": Object {
"flags": Object {
"default": [Function],
"description": "A filter in Kibana Query Language (KQL) that limits the scope of the rule.",
"error": [Function],
"presence": "optional",
},
@ -1990,12 +2003,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The time frame in which the errors must occur (in \`windowUnit\` units). Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [
@ -2025,6 +2040,7 @@ Object {
"keys": Object {
"aggregationType": Object {
"flags": Object {
"description": "The type of aggregation to perform.",
"error": [Function],
},
"matches": Array [
@ -2069,6 +2085,7 @@ Object {
},
"environment": Object {
"flags": Object {
"description": "Filter the rule to apply to a specific environment.",
"error": [Function],
},
"rules": Array [
@ -2090,6 +2107,7 @@ Object {
"items": Array [
Object {
"flags": Object {
"description": "Perform a composite aggregation against the selected fields. When any of these groups match the selected rule conditions, an alert is triggered per group.",
"error": [Function],
"presence": "optional",
},
@ -2224,6 +2242,7 @@ Object {
"serviceName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific service.",
"error": [Function],
"presence": "optional",
},
@ -2244,6 +2263,7 @@ Object {
},
"threshold": Object {
"flags": Object {
"description": "The latency threshold value.",
"error": [Function],
},
"type": "number",
@ -2251,6 +2271,7 @@ Object {
"transactionName": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific transaction name.",
"error": [Function],
"presence": "optional",
},
@ -2272,6 +2293,7 @@ Object {
"transactionType": Object {
"flags": Object {
"default": [Function],
"description": "Filter the rule to apply to a specific transaction type.",
"error": [Function],
"presence": "optional",
},
@ -2293,6 +2315,7 @@ Object {
"useKqlFilter": Object {
"flags": Object {
"default": [Function],
"description": "A Kibana Query Language (KQL) expression thats limits the scope of alerts.",
"error": [Function],
"presence": "optional",
},
@ -2305,12 +2328,14 @@ Object {
},
"windowSize": Object {
"flags": Object {
"description": "The size of the time window (in \`windowUnit\` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.",
"error": [Function],
},
"type": "number",
},
"windowUnit": Object {
"flags": Object {
"description": "The type of units for the time window. For example: minutes, hours, or days.",
"error": [Function],
},
"rules": Array [

View file

@ -9,27 +9,32 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service name.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
windowSize:
type: number
example: 6
description: The window size
description: >
The size of the time window (in `windowUnit` units), which determines how far back to search for documents.
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
windowUnit:
type: string
description: The window size unit
description: >
The type of units for the time window.
For example: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: The environment from APM
description: Filter the rule to apply to a specific environment.
anomalySeverityType:
type: string
description: The anomaly threshold value
description: >
The severity of anomalies that will generate alerts: critical, major, minor, or warning.
enum:
- critical
- major

View file

@ -8,24 +8,27 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the errors coming from your application to apply the rule to a specific service.
windowSize:
type: number
description: The window size
description: >
The time frame in which the errors must occur (in `windowUnit` units).
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: The window size unit
description: >
The type of units for the time window: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: The environment from APM
description: Filter the errors coming from your application to apply the rule to a specific environment.
threshold:
type: number
description: The error count threshold value
description: The error count threshold.
groupBy:
type: array
default: ["service.name", "service.environment"]
@ -37,5 +40,10 @@ properties:
- "service.environment"
- "transaction.name"
- "error.grouping_key"
description: >
Perform a composite aggregation against the selected fields.
When any of these groups match the selected rule conditions, an alert is triggered per group.
errorGroupingKey:
type: string
type: string
description: >
Filter the errors coming from your application to apply the rule to a specific error grouping key, which is a hash of the stack trace and other properties.

View file

@ -9,29 +9,34 @@ required:
properties:
serviceName:
type: string
description: The service name from APM
description: Filter the rule to apply to a specific service.
transactionType:
type: string
description: The transaction type from APM
description: Filter the rule to apply to a specific transaction type.
transactionName:
type: string
description: The transaction name from APM
description: Filter the rule to apply to a specific transaction name.
windowSize:
type: number
description: The window size
description: >
The size of the time window (in `windowUnit` units), which determines how far back to search for documents.
Generally it should be a value higher than the rule check interval to avoid gaps in detection.
example: 6
windowUnit:
type: string
description: ç
description: >
The type of units for the time window.
For example: minutes, hours, or days.
enum:
- "m"
- "h"
- "d"
environment:
type: string
description: Filter the rule to apply to a specific environment.
threshold:
type: number
description: The latency threshold value
description: The latency threshold value.
groupBy:
type: array
default: ["service.name", "service.environment", "transaction.type"]
@ -43,9 +48,13 @@ properties:
- "service.environment"
- "transaction.type"
- "transaction.name"
description: >
Perform a composite aggregation against the selected fields.
When any of these groups match the selected rule conditions, an alert is triggered per group.
aggregationType:
type: string
enum:
- avg
- 95th
- 99th
- 99th
description: The type of aggregation to perform.