Skip to content

Commit

Permalink
[8.13] Make in-product APM alerting links smart (stateful vs serverle…
Browse files Browse the repository at this point in the history
…ss) (#176252) (#179093)

# Backport

This will backport the following commits from `main` to `8.13`:
- [Make in-product APM alerting links smart (stateful vs serverless)
(#176252)](#176252)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Brandon
Morelli","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-20T18:43:41Z","message":"Make
in-product APM alerting links smart (stateful vs serverless)
(#176252)\n\n## Summary\r\n\r\nThis is a part
of\r\nhttps://github.com/elastic/observability-docs/issues/3622.\r\n\r\nBefore
this PR, all four in-product APM alerting documentation links\r\npointed
to\r\nhttps://www.elastic.co/guide/en/kibana/master/apm-alerts.html.
This PR\r\nupdates our in-product links to point to either our
Serverless or\r\nStateful documentation, depending on the product
type.\r\n\r\nCloses
https://github.com/elastic/observability-docs/issues/3586.\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>\r\nCo-authored-by:
Caue Marcondes
<[email protected]>","sha":"62aa3279dfdfb12112827826b6ff2d76b50fbe96","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-infra_services","v8.14.0","v8.13.1"],"title":"Make
in-product APM alerting links smart (stateful vs
serverless)","number":176252,"url":"https://github.com/elastic/kibana/pull/176252","mergeCommit":{"message":"Make
in-product APM alerting links smart (stateful vs serverless)
(#176252)\n\n## Summary\r\n\r\nThis is a part
of\r\nhttps://github.com/elastic/observability-docs/issues/3622.\r\n\r\nBefore
this PR, all four in-product APM alerting documentation links\r\npointed
to\r\nhttps://www.elastic.co/guide/en/kibana/master/apm-alerts.html.
This PR\r\nupdates our in-product links to point to either our
Serverless or\r\nStateful documentation, depending on the product
type.\r\n\r\nCloses
https://github.com/elastic/observability-docs/issues/3586.\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>\r\nCo-authored-by:
Caue Marcondes
<[email protected]>","sha":"62aa3279dfdfb12112827826b6ff2d76b50fbe96"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176252","number":176252,"mergeCommit":{"message":"Make
in-product APM alerting links smart (stateful vs serverless)
(#176252)\n\n## Summary\r\n\r\nThis is a part
of\r\nhttps://github.com/elastic/observability-docs/issues/3622.\r\n\r\nBefore
this PR, all four in-product APM alerting documentation links\r\npointed
to\r\nhttps://www.elastic.co/guide/en/kibana/master/apm-alerts.html.
This PR\r\nupdates our in-product links to point to either our
Serverless or\r\nStateful documentation, depending on the product
type.\r\n\r\nCloses
https://github.com/elastic/observability-docs/issues/3586.\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>\r\nCo-authored-by:
Caue Marcondes
<[email protected]>","sha":"62aa3279dfdfb12112827826b6ff2d76b50fbe96"}},{"branch":"8.13","label":"v8.13.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Brandon Morelli <[email protected]>
  • Loading branch information
kibanamachine and bmorelli25 authored Mar 20, 2024
1 parent 5a40836 commit 5b21dc4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
13 changes: 12 additions & 1 deletion packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,18 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
actionTypes: isServerless
? `${SERVERLESS_DOCS}action-connectors`
: `${KIBANA_DOCS}action-types.html`,
apmRules: `${KIBANA_DOCS}apm-alerts.html`,
apmRulesErrorCount: isServerless
? `${SERVERLESS_OBSERVABILITY_DOCS}create-error-count-threshold-alert-rule`
: `${KIBANA_DOCS}apm-alerts.html`,
apmRulesTransactionDuration: isServerless
? `${SERVERLESS_OBSERVABILITY_DOCS}create-latency-threshold-alert-rule`
: `${KIBANA_DOCS}apm-alerts.html`,
apmRulesTransactionError: isServerless
? `${SERVERLESS_OBSERVABILITY_DOCS}create-failed-transaction-rate-threshold-alert-rule`
: `${KIBANA_DOCS}apm-alerts.html`,
apmRulesAnomaly: isServerless
? `${SERVERLESS_OBSERVABILITY_DOCS}create-anomaly-alert-rule`
: `${KIBANA_DOCS}apm-alerts.html`,
emailAction: `${KIBANA_DOCS}email-action-type.html`,
emailActionConfig: `${KIBANA_DOCS}email-action-type.html`,
emailExchangeClientSecretConfig: `${KIBANA_DOCS}email-action-type.html#exchange-client-secret`,
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ export interface DocLinks {
readonly alerting: Readonly<{
guide: string;
actionTypes: string;
apmRules: string;
apmRulesErrorCount: string;
apmRulesTransactionDuration: string;
apmRulesTransactionError: string;
apmRulesAnomaly: string;
emailAction: string;
emailActionConfig: string;
emailExchangeClientSecretConfig: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ describe('Dependencies with high volume of data', () => {

it('shows dependencies inventory page', () => {
cy.visitKibana(
`/app/apm/dependencies/inventory?${new URLSearchParams({
...timeRange,
kuery: 'elasticsearch*',
})}`
`/app/apm/dependencies/inventory?${new URLSearchParams(timeRange)}`
);

cy.getByTestSubj('dependenciesTable');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function registerApmRuleTypes(
},
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.links.alerting.apmRules}`;
return `${docLinks.links.alerting.apmRulesErrorCount}`;
},
ruleParamsExpression: lazy(() => import('./error_count_rule_type')),
validate: () => ({
Expand Down Expand Up @@ -80,7 +80,7 @@ export function registerApmRuleTypes(
},
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.links.alerting.apmRules}`;
return `${docLinks.links.alerting.apmRulesTransactionDuration}`;
},
ruleParamsExpression: lazy(
() => import('./transaction_duration_rule_type')
Expand Down Expand Up @@ -116,7 +116,7 @@ export function registerApmRuleTypes(
}),
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.links.alerting.apmRules}`;
return `${docLinks.links.alerting.apmRulesTransactionError}`;
},
ruleParamsExpression: lazy(
() => import('./transaction_error_rate_rule_type')
Expand Down Expand Up @@ -146,7 +146,7 @@ export function registerApmRuleTypes(
}),
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.links.alerting.apmRules}`;
return `${docLinks.links.alerting.apmRulesAnomaly}`;
},
ruleParamsExpression: lazy(() => import('./anomaly_rule_type')),
validate: validateAnomalyRule,
Expand Down

0 comments on commit 5b21dc4

Please sign in to comment.