chore(slo): use doclinks (#160673)

This commit is contained in:
Kevin Delemme 2023-07-04 10:50:18 -04:00 committed by GitHub
parent b340cb301b
commit 50e015e4ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -521,6 +521,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
syntheticsCommandReference: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetics-configuration.html#synthetics-configuration-playwright-options`,
syntheticsProjectMonitors: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetic-run-tests.html#synthetic-monitor-choose-project`,
syntheticsMigrateFromIntegration: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetics-migrate-from-integration.html`,
sloBurnRateRule: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/slo-burn-rate-alert.html`,
},
alerting: {
guide: `${KIBANA_DOCS}create-and-manage-rules.html`,

View file

@ -401,6 +401,7 @@ export interface DocLinks {
syntheticsCommandReference: string;
syntheticsProjectMonitors: string;
syntheticsMigrateFromIntegration: string;
sloBurnRateRule: string;
}>;
readonly alerting: Readonly<{
guide: string;

View file

@ -70,7 +70,7 @@ export const registerObservabilityRuleTypes = (
},
iconClass: 'bell',
documentationUrl(docLinks) {
return 'https://www.elastic.co/guide/en/observability/current/slo-burn-rate-alert.html';
return `${docLinks.links.observability.sloBurnRateRule}`;
},
ruleParamsExpression: lazy(() => import('../components/burn_rate_rule_editor')),
validate: validateBurnRateRule,
@ -78,6 +78,7 @@ export const registerObservabilityRuleTypes = (
defaultActionMessage: sloBurnRateDefaultActionMessage,
defaultRecoveryMessage: sloBurnRateDefaultRecoveryMessage,
});
if (config.unsafe.thresholdRule.enabled) {
observabilityRuleTypeRegistry.register({
id: OBSERVABILITY_THRESHOLD_RULE_TYPE_ID,