-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Add error rates to Service Map popovers #69520
Conversation
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values. Call that function in the API for the service map metrics. Fixes elastic#68160.
Pinging @elastic/apm-ui (Team:apm) |
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/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
…lter out NaN from average.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an unused prop that can be removed, but other than that looks good. Thanks so much for picking this up. I can't approve since I'm the original author.
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/Contents.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx
Show resolved
Hide resolved
import { Logger } from 'src/core/server'; | ||
import { UIFilters } from '../../../../typings/ui_filters'; | ||
|
||
export function getParsedUiFilters({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps this should be used here as well:
const uiFilters = JSON.parse(uiFiltersEncoded); |
const setupWithBlankUiFilters = { | ||
...setup, | ||
uiFiltersES: getEnvironmentUiFilterES(environment), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure setupWithBlankUiFilters
is required: it could be redundant with setup.uiFiltersES
. which should be part of the setup object (typed with SetupUIFilters
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is @ogupte , since setup.uiFiltersES
has the service.name
of the route. And it's not what you want on Service Maps, you want the service.name from the node selected, right? So If we don't remove it, we'll have two service.name filters one from the route and another from the node.
"xpack.apm.serviceMap.avgCpuUsagePopoverMetric": "CPU 使用(平均)", | ||
"xpack.apm.serviceMap.avgErrorsPerMinutePopoverMetric": "每分钟错误数(平均)", | ||
"xpack.apm.serviceMap.avgMemoryUsagePopoverMetric": "内存使用(平均)", | ||
"xpack.apm.serviceMap.avgReqPerMinutePopoverMetric": "每分钟请求数(平均)", | ||
"xpack.apm.serviceMap.avgTransDurationPopoverMetric": "事务持续时间(平均)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only the translation for errors would have changed, so the others should only update their ids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few comments, but looks good, and verified with local testing
retest |
@elasticmachine merge upstream |
import expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../../common/ftr_provider_context'; | ||
|
||
export default function serviceMapsApiTests({ getService }: FtrProviderContext) { | ||
const supertest = getService('supertest'); | ||
const esArchiver = getService('esArchiver'); | ||
|
||
const start = encodeURIComponent('2020-06-29T06:45:00.000Z'); | ||
const end = encodeURIComponent('2020-06-29T06:49:00.000Z'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep this?
return getServiceMapServiceNodeInfo({ | ||
setup, | ||
serviceName, | ||
environment, | ||
uiFilters, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this. Glad that we are back to using the uiFilters
💚 Build SucceededBuild metricsasync chunks size
miscellaneous assets size
History
To update your PR or re-run it, just comment with: |
* master: [APM] Add error rates to Service Map popovers (elastic#69520) [Security Solution][Detection Engine] - Update exceptions logic (elastic#71512) [Security Solution] Full screen timeline, Collapse event (elastic#71786) [Security Solution][Exception Modal] Create endpoint exception list if it doesn't already exist (elastic#71807) [Detection Rules] Add 7.9 rules (elastic#71808) [Search] Add telemetry for data plugin search service (elastic#70677) Add @elastic/safer-lodash-set as an alternative to lodash.set (elastic#67452) [tests] Temporarily skipped to promote snapshot
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values. Call that function in the API for the service map metrics. Fixes elastic#68160. Co-authored-by: cauemarcondes <[email protected]>
* master: [APM] Add error rates to Service Map popovers (elastic#69520) [Security Solution][Detection Engine] - Update exceptions logic (elastic#71512) [Security Solution] Full screen timeline, Collapse event (elastic#71786) [Security Solution][Exception Modal] Create endpoint exception list if it doesn't already exist (elastic#71807) [Detection Rules] Add 7.9 rules (elastic#71808) [Search] Add telemetry for data plugin search service (elastic#70677) Add @elastic/safer-lodash-set as an alternative to lodash.set (elastic#67452) [tests] Temporarily skipped to promote snapshot
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values. Call that function in the API for the service map metrics. Fixes #68160. Co-authored-by: cauemarcondes <[email protected]> Co-authored-by: cauemarcondes <[email protected]>
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values. Call that function in the API for the service map metrics. Fixes elastic#68160. Co-authored-by: cauemarcondes <[email protected]>
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values. Call that function in the API for the service map metrics. Fixes #68160. Co-authored-by: cauemarcondes <[email protected]> Co-authored-by: cauemarcondes <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Change the average errors per minute to error rate on the service map popover.
Make the
getErrorRate
function used in the error rate charts return anaverage
property that can be used in the error rate chart and on the popovers.Call that function in the API for the service map stats.
Rename all of the "metric" wording of the methods and classes to use "stats" instead, since "metric" is a very overloaded term.
Update the popovers to use the environment of the node being selected rather than the environment of the environment switcher.
Add the popover to Storybook.
Fixes #68160.