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] Split All instances API adding a new API to return comparison statistics #94767

Merged

Conversation

cauemarcondes
Copy link
Contributor

@cauemarcondes cauemarcondes commented Mar 16, 2021

closes #90577

Screen Shot 2021-03-22 at 16 00 48

@cauemarcondes cauemarcondes added release_note:skip Skip the PR/issue when compiling release notes v7.13.0 apm:comparison labels Mar 16, 2021
@cauemarcondes cauemarcondes force-pushed the apm-time-comparison-instances branch from 1b964fb to 6524826 Compare March 17, 2021 13:39
@cauemarcondes cauemarcondes force-pushed the apm-time-comparison-instances branch from 7fd25a9 to 65086fe Compare March 22, 2021 19:41
@cauemarcondes cauemarcondes marked this pull request as ready for review March 22, 2021 20:10
@cauemarcondes cauemarcondes requested a review from a team as a code owner March 22, 2021 20:10
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Mar 23, 2021
@elasticmachine
Copy link
Contributor

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

return (
<>
{/* <EuiFlexItem grow={3}>
<InstancesLatencyDistributionChart
height={chartHeight}
items={data}
items={data.items}
status={status}
/>
</EuiFlexItem> */}
Copy link
Contributor

Choose a reason for hiding this comment

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

did you forget to remove this commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

max: end,
},
},
aggs: { avg: { avg: agg } },
Copy link
Contributor

Choose a reason for hiding this comment

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

it's not necessary, but i usually like to name aggs something descriptive, like comparisonAvg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it's a generic function I'd rather leaving the way it is now. Otherwise, I'll have to check if the field exists before using it.

(response.aggregations?.[SERVICE_NODE_NAME].buckets.map(
(serviceNodeBucket) => {
const { doc_count: count, key } = serviceNodeBucket;
const serviceNodeName = String(key);
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't key always be a string? why is the cast needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually no, key can be string | number

@@ -24,25 +30,78 @@ interface ServiceOverviewInstancesChartAndTableProps {
serviceName: string;
}

const INITIAL_STATE = {
items: [] as Array<{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use something from ApiReturnType here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cauemarcondes cauemarcondes requested a review from smith March 25, 2021 15:19
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1757 1758 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 5.0MB 5.0MB +6.8KB

History

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

@cauemarcondes cauemarcondes merged commit 33b81b1 into elastic:master Mar 26, 2021
@cauemarcondes cauemarcondes deleted the apm-time-comparison-instances branch March 26, 2021 13:14
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Mar 26, 2021
…tatistics (elastic#94767)

* adding comparison to instances table

* fixing tests

* adding api tests

* removing unnecessary files

* fixing ts issue

* fixing ts issue

* refactoring

* refactoring

* refactoring

* refactoring

* refactoring

* addressing PR comments

* addressing PR comments
cauemarcondes added a commit that referenced this pull request Mar 26, 2021
…tatistics (#94767) (#95522)

* adding comparison to instances table

* fixing tests

* adding api tests

* removing unnecessary files

* fixing ts issue

* fixing ts issue

* refactoring

* refactoring

* refactoring

* refactoring

* refactoring

* addressing PR comments

* addressing PR comments
@ogupte ogupte self-assigned this May 10, 2021
@ogupte ogupte added the apm:test-plan-done Pull request that was successfully tested during the test plan label May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:comparison apm:test-plan-7.13.0 apm:test-plan-done Pull request that was successfully tested during the test plan release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Split All instances API adding a new API to return comparison statistics
5 participants