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

[APM] Add error rates to Service Map popovers #69520

Merged
merged 39 commits into from
Jul 15, 2020

Conversation

smith
Copy link
Contributor

@smith smith commented Jun 18, 2020

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 an average 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.

image

Fixes #68160.

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.
@smith smith requested a review from a team as a code owner June 18, 2020 15:07
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Jun 18, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@smith smith changed the title [APM] Add error rates to Service Map popovers [APM] Add error rates to Service Map popovers and environment fixes Jun 29, 2020
@smith smith requested a review from sorenlouv June 29, 2020 17:59
Copy link
Contributor Author

@smith smith left a 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.

import { Logger } from 'src/core/server';
import { UIFilters } from '../../../../typings/ui_filters';

export function getParsedUiFilters({
Copy link
Contributor

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);

Comment on lines +93 to 96
const setupWithBlankUiFilters = {
...setup,
uiFiltersES: getEnvironmentUiFilterES(environment),
};
Copy link
Contributor

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).

Copy link
Contributor

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.

Comment on lines 4338 to 4342
"xpack.apm.serviceMap.avgCpuUsagePopoverMetric": "CPU 使用(平均)",
"xpack.apm.serviceMap.avgErrorsPerMinutePopoverMetric": "每分钟错误数(平均)",
"xpack.apm.serviceMap.avgMemoryUsagePopoverMetric": "内存使用(平均)",
"xpack.apm.serviceMap.avgReqPerMinutePopoverMetric": "每分钟请求数(平均)",
"xpack.apm.serviceMap.avgTransDurationPopoverMetric": "事务持续时间(平均)",
Copy link
Contributor

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

Copy link
Contributor

@ogupte ogupte left a 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

@smith
Copy link
Contributor Author

smith commented Jul 14, 2020

retest

@sorenlouv
Copy link
Member

@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');
Copy link
Member

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,
Copy link
Member

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

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
apm 5.2MB -155.0B 5.2MB

miscellaneous assets size

id value diff baseline
upgradeAssistant 22.5KB -15.0B 22.6KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@smith smith merged commit f69edbd into elastic:master Jul 15, 2020
@smith smith deleted the nls/pop-error-rate branch July 15, 2020 12:18
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 15, 2020
* 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
smith added a commit to smith/kibana that referenced this pull request Jul 15, 2020
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]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 15, 2020
* 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
smith added a commit that referenced this pull request Jul 15, 2020
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]>
smith added a commit to smith/kibana that referenced this pull request Jul 16, 2020
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]>
smith added a commit that referenced this pull request Jul 17, 2020
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:APM All issues that need APM UI Team support v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Service maps popover: Change the errors per minute to error rate
7 participants