-
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] Adding comparison to transactions table #91435
[APM] Adding comparison to transactions table #91435
Conversation
Pinging @elastic/apm-ui (Team:apm) |
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Outdated
Show resolved
Hide resolved
…arison-transactions-table
@elasticmachine merge upstream |
...m/public/components/app/service_overview/service_overview_transactions_table/get_columns.tsx
Outdated
Show resolved
Hide resolved
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/charts/comparison_spark_plot/index.tsx
Outdated
Show resolved
Hide resolved
const currentPeriodPromise = getServiceTransactionGroupComparisonStatistics({ | ||
...commomProps, | ||
start, | ||
end, | ||
}); |
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.
any reason why this needs an intermediate variable, rather than inlining it in await Promise.all()
?
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 just think it makes it easier to read with two separated variables.
x-pack/plugins/apm/server/lib/services/get_service_transaction_group_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/charts/comparison_spark_plot/index.tsx
Outdated
Show resolved
Hide resolved
2f23bc8
to
9aeb9ef
Compare
…arison-transactions-table
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.
The comments here are only for a few misspellings in variable names, not blocking.
But what is blocking is that if I check/uncheck comparisons it doesn't update the impact bars. Also it always shows two bars, even if comparisons are off. Do we want it to switch back to the single bar? I think so.
...m/public/components/app/service_overview/service_overview_transactions_table/get_columns.tsx
Outdated
Show resolved
Hide resolved
...m/public/components/app/service_overview/service_overview_transactions_table/get_columns.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/services/get_service_transaction_group_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Outdated
Show resolved
Hide resolved
comparisonType, | ||
pageIndex, | ||
direction, | ||
field, |
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'd be worth trying to figure out if we can move calculating the visible transaction groups into the useFetcher call as well, to see if we no longer need to disable react-hooks/exhaustive-deps
.
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.
@dgieselaar I can calculate the visible transaction groups inside useFetcher, but I'll still need the react-hooks/exhaustive-deps
, because comparisonType
needs to be listed on its dependencies, even though it is not used, to trigger the comparison API call when it's changed.
x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
Outdated
Show resolved
Hide resolved
@@ -85,8 +98,8 @@ export function SparkPlot({ | |||
showLegend={false} | |||
tooltip="none" | |||
/> | |||
<AreaSeries | |||
id="area" | |||
<SparkelineSeries |
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.
This can't be a LineSeries all the time (or an area series)? What changes?
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.
This is necessary because when comparison is enabled/visible we should change the current period sparkline to LineSeries and show the previous period with AreaSeries.
There's no technical problem with changing all sparklines to LineSeries, but all tables that yet don't have comparison implemented would change to a LineSeries, if @formgeist agrees I'm fine too.
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.
The thoughts behind the mixed chart types was primarily to create difference in the sparklines between the current and previous time periods. I think if we keep to either line or area, the comparison vanishes a bit because of the size of the chart. @cauemarcondes is it easy to exemplify the two charts (line or area)?
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.
To be clear, I am fine with mixing line and area. I was just wondering why it's necessary for the current period to switch, and why it can't always be either a line or an area series.
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 it's necessary for the current period to switch, and why it can't always be either a line or an area series.
Because there are some places where the spakline is used and it doesn't have comparison data, like on the Service Inventory page table. If I always show it as a LineSeries it would change this table too, that's why I asked @formgeist .
x-pack/plugins/apm/server/utils/offset_previous_period_coordinate.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/tests/transactions/transactions_groups_comparison_statistics.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
You can have the function act as a type guard.
…On Mon, Mar 8, 2021, 15:29 Cauê Marcondes ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In x-pack/plugins/apm/public/components/shared/charts/spark_plot/index.tsx
<#91435 (comment)>:
> return (
<EuiFlexGroup gutterSize="m" responsive={false}>
<EuiFlexItem grow={false}>
- {!series || series.every((point) => point.y === null) ? (
+ {!series || isEmptyTimeseries(series) ? (
It could, but TS still complains about series be undefined.
[image: Screen Shot 2021-03-08 at 09 28 49]
<https://user-images.githubusercontent.com/55978943/110334390-b75aec80-7ff0-11eb-8316-e80e210d1ddc.png>
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#91435 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWDXCLSRUFPHDIEIHY2OTTCTNM5ANCNFSM4XVEMWOA>
.
|
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Show resolved
Hide resolved
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.
Great work! excited to see this merging 🚢
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* adding comparison to transactions table * fixing api test * merge * addressing PR comments * addressing PR comments * adding kuery filter * fixing tests * addressing PR comments * fixing concurrency issues * addressing PR comments * addressing PR comments * addressing PR comments * hiding impact bar when comparison disable Co-authored-by: Kibana Machine <[email protected]>
* adding comparison to transactions table * fixing api test * merge * addressing PR comments * addressing PR comments * adding kuery filter * fixing tests * addressing PR comments * fixing concurrency issues * addressing PR comments * addressing PR comments * addressing PR comments * hiding impact bar when comparison disable Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
closes #90572
comparion-transactions-table.mov