-
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] Add table tabs showing summary of metrics #153044
[APM] Add table tabs showing summary of metrics #153044
Conversation
21305a1
to
fcc8c82
Compare
Pinging @elastic/apm-ui (Team:APM) |
x-pack/plugins/apm/public/components/app/mobile/transaction_overview/index.tsx
Show resolved
Hide resolved
...lic/components/app/mobile/transaction_overview/transaction_overview_tabs/app_version_tab.tsx
Outdated
Show resolved
Hide resolved
.../public/components/app/mobile/transaction_overview/transaction_overview_tabs/devices_tab.tsx
Outdated
Show resolved
Hide resolved
...ns/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/index.tsx
Outdated
Show resolved
Hide resolved
...blic/components/app/mobile/transaction_overview/transaction_overview_tabs/os_version_tab.tsx
Outdated
Show resolved
Hide resolved
...ic/components/app/mobile/transaction_overview/transaction_overview_tabs/transactions_tab.tsx
Outdated
Show resolved
Hide resolved
...s/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts
Outdated
Show resolved
Hide resolved
...s/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx
Outdated
Show resolved
Hide resolved
829708a
to
288a836
Compare
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.
Can you add API tests?
/oblt-deploy |
I'm working on getting the data we need in sythtrace to be able to test |
b0b9dc7
to
b3121cc
Compare
x-pack/plugins/apm/public/components/app/mobile/transaction_overview/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts
Outdated
Show resolved
Hide resolved
...ponents/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/get_columns.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts
Outdated
Show resolved
Hide resolved
`get_mobile_detailed_statistics_by_${field}`, | ||
{ | ||
apm: { | ||
events: [ProcessorEvent.transaction], |
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.
do we need to always query transaction events? are there scenarios where we can use transaction metrics, maybe even rolled up?
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.
Mobile fields (device, etc) are not added into metrics due to dimension explosion so for now, we rely on raw span and transaction documents for the mobile data
x-pack/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts
Outdated
Show resolved
Hide resolved
043cd19
to
d07d024
Compare
c0be4d4
to
578b81e
Compare
{ | ||
field: 'name', | ||
name: i18n.translate( | ||
'xpack.apm.mobile.transactions.overview.table.nameLabel', |
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 is this nameLabel
and the other one are ...ColumnLabel
? Would be good to keep this consistent. Same applies to crash rate.
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.
Addressed here a79ebaa
} | ||
), | ||
align: RIGHT_ALIGNMENT, | ||
render: (_, { crashRate }) => { |
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 realize this is out of scope, but why don't we have a spark plot/comparison for crash rate?
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 followed the designs, but I will take a note and ask @boriskirov when he is back
isLoading | ||
? i18n.translate('xpack.apm.statsTable.loading', { | ||
defaultMessage: 'Loading...', | ||
}) | ||
: i18n.translate('xpack.apm.statsTable.noDataLabel', { | ||
defaultMessage: 'No data found', | ||
}) | ||
} |
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.
statsTable
seems broad, and don't we have labels or a component that we can reuse to wrap it in a loading state? I thought we did but maybe we removed it.
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 could find a component for that, I checked how we did for other tables
I will improve the i18n 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.
Addressed here a79ebaa
apm: { | ||
events: [ProcessorEvent.transaction], | ||
}, |
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.
@MiriamAparicio this feedback is still important to address IMHO.
end, | ||
field, | ||
}: Props) { | ||
const response = await apmEventClient.search( | ||
`get_mobile_transaction_events_main_statistics_by_field`, | ||
{ | ||
apm: { | ||
events: [ProcessorEvent.transaction, ProcessorEvent.error], |
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.
Can you use sources
here as well? You'll need to add an ApmDocumentType
for errors.
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.
It looks like this should actually be two requests, one for transaction events for latency and sessions, and then a separate one for errors to get the number of crashes?
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.
Addressed here a79ebaa
], | ||
}, | ||
}, | ||
_source: [AGENT_NAME], |
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.
What's the point if _source
if size
is set to 0?
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 guess you're not using it anymore?
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.
Yes, good catch was a leftover
field: 'service.version', | ||
}); | ||
expect(isEmpty(response.currentPeriod)).to.be.equal(false); | ||
expect(isEmpty(response.previousPeriod)).to.be.equal(true); |
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 really needs value-specific tests, not just whether it's empty or not. This is important to make sure we calculate the statistics correctly.
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.
100% agree! In general we are a bit light on the value-specific tests (not just this PR).
Afair back when we used ES archives heavily, the recommendation was to NOT use value-specific tests, because it was time consuming to update them when the archive changed.
That is no longer the case, and perhaps we need to broadcast that.
A tech session on "API test best practices" would be great.
expect(throughputValues).to.be.eql([ | ||
1.2000013333348147, 0.40000044444493826, 0.40000044444493826, | ||
]); |
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 more like snapshot testing. How do you calculate these values based on the inputs for generating data? I'd like to see that calculation in this file instead of writing out numbers that could as well be random to the reader.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
There were some comments regarding the api test done for the mobile transactions main and detailed statistics as part of this [PR](#153044) ### Summary - add value specific test not just check if the response is empty (detailed statistics timeseries test) - calculate values based on the inputs for generating data, instead of like snapshot testing (throughput) This PR also contains the fixes for the following failing skipped tests - #156207 - #156218
There were some comments regarding the api test done for the mobile transactions main and detailed statistics as part of this [PR](#153044) ### Summary - add value specific test not just check if the response is empty (detailed statistics timeseries test) - calculate values based on the inputs for generating data, instead of like snapshot testing (throughput) This PR also contains the fixes for the following failing skipped tests - #156207 - #156218
Closes #146877
Notes:
host.os.version
andservice.version
is only available on transactions, metrics and errors. Not spans for now, there are two issues opened to fix this for the apm mobile agents teamPending:
Screen.Recording.2023-04-25.at.12.50.56.mov