[APM] Service maps anomaly detection integration by environment#70932
[APM] Service maps anomaly detection integration by environment#70932ogupte merged 16 commits intoelastic:masterfrom
Conversation
- Adds anomaly detection integration to service maps backed by apm ML jobs per environment - Loads transaction stats and anomalies for each transaction types - Renders a selector in the popop to choose a transaction type to view stats
…e maps popover - only aggregates transaction KPIs and anomaly scores for transaction.type = "request" or "page-load" - supports environment filter 'All' option to display data from all APM anomaly detection jobs - handle case where popover metrics don't exist for services outside the current environment filter
c383cb4 to
13a95fd
Compare
|
Pinging @elastic/apm-ui (Team:apm) |
| if (!matchingMLJob) { | ||
| throw new Error(`ML job Not Found for environment "${environment}".`); | ||
| } |
There was a problem hiding this comment.
When would this happen? And how is this error handled?
There was a problem hiding this comment.
This would happen if the user selects an environment in the filter which doesn't have an ml job. We handle it by logging the error then returning an empty set of service anomalies. This surfaces to the user as having no anomaly data for the selected service. Then they can update their filters to see anomalies in the map.
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/AnomalyDetection.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/service_map/transform_service_map_responses.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceMetricList.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/Links/MachineLearningLinks/MLJobLink.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts
Outdated
Show resolved
Hide resolved
bmorelli25
left a comment
There was a problem hiding this comment.
Two small text recommendations from me.
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceMetricFetcher.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceMetricFetcher.tsx
Outdated
Show resolved
Hide resolved
then filters for it when returing valid APM ML jobs
x-pack/plugins/apm/server/lib/service_map/transform_service_map_responses.ts
Outdated
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
- renders the "no data" message as plain text instead of in a callout - hides the 'Anomaly detection' section if there is not anomaly data.
filters properly by filtering for docs where service.environment does not exist
…_tags.apm_ml_version`
…-maps-anomaly-detection
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/lens/smokescreen·ts.lens app lens smokescreen tests should allow creation of lens visualizationsStandard OutStack TraceBuild metrics
History
To update your PR or re-run it, just comment with: |
…tic#70932) * Closes elastic#69480 & elastic#70419. - Adds anomaly detection integration to service maps backed by apm ML jobs per environment - Loads transaction stats and anomalies for each transaction types - Renders a selector in the popop to choose a transaction type to view stats * - implements original anomaly detection integration design for service maps popover - only aggregates transaction KPIs and anomaly scores for transaction.type = "request" or "page-load" - supports environment filter 'All' option to display data from all APM anomaly detection jobs - handle case where popover metrics don't exist for services outside the current environment filter * fixes some CI errors * Simplified messaging for service popop with not data in the current environment * PR feedback, renamed max anomalies -> service anomalies including the file name * - defines custom_settings.job_tags.apm_ml_version in ML job creation, then filters for it when returing valid APM ML jobs * changes shape of of service anomalies from an array to a object keyed by serviceName * removes the url encoding from ML job link href to how it was previously. * PR feedback * Popover no data state simplified: - renders the "no data" message as plain text instead of in a callout - hides the 'Anomaly detection' section if there is not anomaly data. * Fixes filtering bug when user selects 'Environment: Not defined'. Now filters properly by filtering for docs where service.environment does not exist * filters jobs fetched in the settings page by `job.custom_settings.job_tags.apm_ml_version` * Fixed bad import from last upstream merge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…) (#71391) * Closes #69480 & #70419. - Adds anomaly detection integration to service maps backed by apm ML jobs per environment - Loads transaction stats and anomalies for each transaction types - Renders a selector in the popop to choose a transaction type to view stats * - implements original anomaly detection integration design for service maps popover - only aggregates transaction KPIs and anomaly scores for transaction.type = "request" or "page-load" - supports environment filter 'All' option to display data from all APM anomaly detection jobs - handle case where popover metrics don't exist for services outside the current environment filter * fixes some CI errors * Simplified messaging for service popop with not data in the current environment * PR feedback, renamed max anomalies -> service anomalies including the file name * - defines custom_settings.job_tags.apm_ml_version in ML job creation, then filters for it when returing valid APM ML jobs * changes shape of of service anomalies from an array to a object keyed by serviceName * removes the url encoding from ML job link href to how it was previously. * PR feedback * Popover no data state simplified: - renders the "no data" message as plain text instead of in a callout - hides the 'Anomaly detection' section if there is not anomaly data. * Fixes filtering bug when user selects 'Environment: Not defined'. Now filters properly by filtering for docs where service.environment does not exist * filters jobs fetched in the settings page by `job.custom_settings.job_tags.apm_ml_version` * Fixed bad import from last upstream merge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes #69480
page-loadfor RUM services andrequestfor everything else