-
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] Service overview: Transactions table #83429
[APM] Service overview: Transactions table #83429
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
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Show resolved
Hide resolved
valueLabel={ | ||
latency.value !== null | ||
? asDuration(latency.value) | ||
: NOT_AVAILABLE_LABEL | ||
} |
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.
asDuration
already defaults to NOT_AVAILABLE_LABEL
when there's no value
valueLabel={ | |
latency.value !== null | |
? asDuration(latency.value) | |
: NOT_AVAILABLE_LABEL | |
} | |
valueLabel={asDuration(latency.value)} |
...ins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx
Outdated
Show resolved
Hide resolved
? asTransactionRate(traffic.value) | ||
: NOT_AVAILABLE_LABEL | ||
} | ||
start={parseFloat(start!)} |
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 don't understand this. Isn't start
a string like 2020-11-09T19:48:43.778Z
? If that's the case parseFloat
returns 2020
- is that the intention?
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.
Btw looking closer at this:
- We don't need to pass
start
orend
toSparkPlotWithValueLabel
since we don't show any ticks the date range for the empty state doesn't matter - Furthermore: the empty state created in
SparkPlotWithValueLabel
seems to be made doubly redundant inSparkPlot
by theisEmpty
check
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.
No idea how I got here 🤦♂️ Will fix.
x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/service_overview/transaction_groups.ts
Outdated
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.
Looks good. Søren's comments make sense too.
I just merged #83360, so could you please set this up to use ServiceOverviewTable
instead of of EuiBasicTable
? It handles some CSS for the loading state and pinning the pagination to the bottom.
Could we make the impact column a touch wider? It's truncated when we sort by it, which is the default:
…iew-transactions-table
…iew-transactions-table
…iew-transactions-table
start={new Date(start!).getTime()} | ||
end={new Date(end!).getTime()} |
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.
Still not following this. Why are we passing start
and end
? We are not using it for the empty state anyway (it's a plot without ticks)
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.
Ah, I get what you mean now, will fix.
start={new Date(start!).getTime()} | ||
end={new Date(end!).getTime()} |
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.
Same as above
start={new Date(start!).getTime()} | ||
end={new Date(end!).getTime()} |
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.
Same as above
describe('Service overview transaction groups', () => { | ||
describe('when data is not loaded', () => { | ||
it('handles the empty state', async () => { | ||
const response = await supertest.get( |
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.
nit: This is still typed as any
but not terribly important.
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.
Not for now but a thought I just got:
WDYT about a client that wraps supertest
and automatically gets the type based on the url and method - similar to what we use in APM?
const res = apmSupertest({
endpoint: 'GET /api/apm/services/opbeans-java/overview_transaction_groups',
query: {
start,
end,
uiFilters: '{}',
size: 5,
numBuckets: 20,
pageIndex: 0,
sortDirection: 'desc',
sortField: 'impact',
},
// ...
})
I think that would provide an awesome DX - especially when editing a test to accommodate an API change
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 like it 👍 I think there's a small chance of us being less inclined to test things that don't align with the types, but generally I would say the benefits outweigh that risk.
* master: (38 commits) [ML] Data frame analytics: Adds functionality to map view (elastic#83710) Add usage collection for savedObject tagging (elastic#83160) [SECURITY_SOLUTION] 145: Advanced Policy Tests (elastic#82898) [APM] Service overview transactions table (elastic#83429) [ML] Fix Single Metric Viewer not loading if job is metric with no partition (elastic#83880) do not export types from 3rd party modules as 'type' (elastic#83803) [Fleet] Allow to send SETTINGS action (elastic#83707) Fixes Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details·ts - Actions and Triggers app Alert Details Alert Instances renders the active alert instances (elastic#83478) [Uptime]Reduce chart height on monitor detail page (elastic#83777) [APM] Prefer `APIReturnType` over `PromiseReturnType` (elastic#83843) [Observability] Fix telemetry for Observability Overview (elastic#83847) [Alerting] Adds generic UI for the definition of conditions for Action Groups (elastic#83278) ensure workload agg doesnt run until next interval when it fails (elastic#83632) [ILM] Policy form should not throw away data (elastic#83077) [Monitoring] Stop collecting Kibana Usage in bulkUploader (elastic#83546) [TSVB] fix wrong imports (elastic#83798) [APM] Correlations UI POC (elastic#82256) list all the refs in tsconfig.json (elastic#83678) Bump jest (and related packages) to v26.6.3 (elastic#83724) Functional tests - stabilize reporting tests for cloud execution (elastic#83787) ...
Co-authored-by: Dario Gieselaar <[email protected]>
💔 Build Failed
Failed CI StepsTest FailuresX-Pack API Integration Tests.x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data·ts.apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table dataStandard Out
Stack Trace
X-Pack API Integration Tests.x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data·ts.apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table dataStandard Out
Stack Trace
Metrics [docs]Module Count
Async chunks
Distributable file count
History
To update your PR or re-run it, just comment with: |
Closes #81726.
Mostly the same work as error groups, so lots of duplication. The instance table in #81721 will need similar functionality. I think that would be the right time to figure out what the right abstraction would be (if we decide we need one).