Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Synthetics] Fix doc links for alerts and documentation #168486

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
monitorUptimeSynthetics: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/monitor-uptime-synthetics.html`,
userExperience: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/user-experience.html`,
createAlerts: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/create-alerts.html`,
syntheticsAlerting: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetics-settings.html#synthetics-settings-alerting`,
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`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ export interface DocLinks {
monitorUptimeSynthetics: string;
userExperience: string;
createAlerts: string;
syntheticsAlerting: string;
syntheticsCommandReference: string;
syntheticsProjectMonitors: string;
syntheticsMigrateFromIntegration: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const initMonitorStatusAlertType: AlertTypeInitializer = ({
description,
iconClass: 'uptimeApp',
documentationUrl(docLinks) {
return `${docLinks.links.observability.monitorStatus}`;
return `${docLinks.links.observability.syntheticsAlerting}`;
},
ruleParamsExpression: (paramProps: RuleTypeParamsExpressionProps<StatusRuleParams>) => (
<MonitorStatusAlert core={core} plugins={plugins} params={paramProps} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const initTlsAlertType: AlertTypeInitializer = ({
id: SYNTHETICS_ALERT_RULE_TYPES.TLS,
iconClass: 'uptimeApp',
documentationUrl(docLinks) {
return `${docLinks.links.observability.tlsCertificate}`;
return `${docLinks.links.observability.syntheticsAlerting}`;
},
ruleParamsExpression: (params: RuleTypeParamsExpressionProps<TLSParams>) => (
<TLSAlert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export function renderApp(
links: [
{
linkType: 'documentation',
href: `${docLinks.links.observability.monitorUptime}`, // TODO: Include synthetics link
href: `${docLinks.links.observability.monitorUptimeSynthetics}`,
},
{
linkType: 'discuss',
href: 'https://discuss.elastic.co/c/uptime', // TODO: Include synthetics link
href: 'https://discuss.elastic.co/c/uptime', // Redirects to https://discuss.elastic.co/c/observability/synthetics/75
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious.. is there any reason not to point to the synthetics link instead of triggering a redirect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not confident how static is https://discuss.elastic.co/c/observability/synthetics/75 (seeing 75 in it), so I left it as is. However, I am open to suggestions.

},
],
}),
Expand Down