-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] APM Latency Correlations: Fix empty state #109813
[ML] APM Latency Correlations: Fix empty state #109813
Conversation
Pinging @elastic/apm-ui (Team:apm) |
Pinging @elastic/ml-ui (:ml) |
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.
@peteharverson Fixed the tooltip text in ca86f76. Also fixed #109879 in cc7f8f1, the code changes would be overlapping if doing it in a separate PR. |
@walterra Noticed a small change in the empty prompt where the word-break is now showing the two paragraphs too far apart. I think we need to remove the 2 Current
Proposed
|
@formgeist good catch! fixed in 137b14e. |
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.
Tested latest changes and LGTM
This reverts commit ca86f76.
@@ -95,7 +95,7 @@ export function FailedTransactionsCorrelations({ | |||
const startFetchHandler = useCallback(() => { | |||
startFetch(searchServicePrams); | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, [environment, serviceName, kuery, start, end]); | |||
}, [environment, serviceName, transactionType, kuery, 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.
This bug occurred because we have eslint suppress errors. Why do we do that in the first place? Can we remove it?
Also: looking at this it looks like we are still missing transactionName
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.
Improved in 34e882c. We originally had it there because the callback startFetch
/cancelFetch
were reinstantiated on every hook call. I wrapped them in useCallback
so that doesn't happen anymore.
@@ -117,11 +132,10 @@ export function TransactionDistribution({ | |||
|
|||
return () => { | |||
// cancel any running async partial request when unmounting the component | |||
// we want this effect to execute exactly once after the component mounts | |||
cancelFetch(); | |||
}; | |||
// eslint-disable-next-line 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.
Same as above: can we remove the lint supression?
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.
We have to keep it here because isRunning
is in there as a safety measure to cancel a still running service on a refresh, but don't want to trigger on every isRunning
change. I added a comment to make it more clear.
); | ||
|
||
useEffect(() => { | ||
if (typeof onHasData === 'function') { |
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.
Isn't this typed so it can only be () => void | undefined
or something like that? In that case we know it's a function if it's not undefined:
if (typeof onHasData === 'function') { | |
if (onHasData) { |
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.
Usually I try to write these ifs similar to "How would we write this if we'd move it to a type guard?" to be a bit more strict at runtime. It won't make much a difference in this case of course because it's just us consuming the component and it's not dynamic data.
x-pack/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx
Show resolved
Hide resolved
As a general comment: it is somtimes hard to see where the separation between Kibana Search service logic and the correlation business logic. I noticed a lot of duplication between the following files: Data fetchers
Search strategies
Search services
Having some generic abstractions on top of Kibana Search service would go along way. We both need it on the server, and something similar to |
Because we worked in parallel on similar features in separate PRs, we decided to go with duplicate code for 7.15 to make FF and avoid running out of sync or put a burden on us with more complex merge conflicts. Now that everything is in master there's definitely room for a lot of deduplication. |
…s hit before retrieving any data.
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.
Tested latest edits and LGTM
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
- Correctly renders the empty chart state when no data is available. - Hides the "Click drag to select" and trace samples message when the chart shows an empty state to avoid redundant info. - Adds jest unit tests that would fail with the previously visible loading indicators. - Fix a bug with cancelling search strategies.
💔 Backport failed
Successful backport PRs will be merged automatically after passing CI. To backport manually run: |
- Correctly renders the empty chart state when no data is available. - Hides the "Click drag to select" and trace samples message when the chart shows an empty state to avoid redundant info. - Adds jest unit tests that would fail with the previously visible loading indicators. - Fix a bug with cancelling search strategies. Co-authored-by: Walter Rafelsberger <[email protected]>
- Correctly renders the empty chart state when no data is available. - Hides the "Click drag to select" and trace samples message when the chart shows an empty state to avoid redundant info. - Adds jest unit tests that would fail with the previously visible loading indicators. - Fix a bug with cancelling search strategies. # Conflicts: # x-pack/plugins/apm/public/components/app/correlations/latency_correlations.tsx # x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.tsx
…eporting-to-v2 * 'master' of github.com:elastic/kibana: (120 commits) [Lens] should register "suffix" field formatter in setup lifecycle (elastic#110218) skip flaky suite (elastic#98463) skip flaky suite (elastic#108633) [Data Table] Expensive queries are causing unnecessary load and delays on Elasticsearch (elastic#98903) fixes failing tests (elastic#110436) [TSVB] Remove deprecated `IFieldType` (elastic#110404) [Lens] Remove deprecated `IFieldType` (elastic#109825) [Vega] Expensive queries are causing unnecessary load and delays on Elasticsearch (elastic#99023) [Visualizations] Expensive queries are causing unnecessary load and delays on Elasticsearch (elastic#99031) [TSVB] Expensive queries are causing unnecessary load and delays on Elasticsearch (elastic#98914) Don't add split part of UI if we have one series (elastic#109483) [Discover] Migrate angular routing to react router (elastic#107042) [Security Solution][Endpoint][Event Filters] Fixes missing spacers between event filters cards (elastic#110282) [ML] Data Grid: Fix alignment of sorting arrow when histogram charts are enabled (elastic#110053) [canvas] Fix image argument form issues (elastic#109767) Fix asset in Pitch template (elastic#109742) chore(NA): moving @kbn/securitysolution-list-api to babel transpiler (elastic#110265) chore(NA): moving @kbn/securitysolution-list-constants to babel transpiler (elastic#110269) [Fleet] Fix upgrade link in Fleet policy table (elastic#110228) [ML] APM Latency Correlations: Fix empty state (elastic#109813) ... # Conflicts: # src/plugins/data/common/query/timefilter/types.ts
Summary
Fixes #109608.
Fixes #109879.
Previous:
Updated:
Checklist