Skip to content

Commit

Permalink
[APM] Mobile crashes & errors (#165892)
Browse files Browse the repository at this point in the history
## Summary

This PR adds back the `Errors` tab to mobile apm services under the
title `Errors & Crashes`. This new page is split into too sections:
errors, and crashes.

Error Tab:
<img width="1456" alt="Screenshot 2023-10-25 at 10 57 00"
src="https://github.com/elastic/kibana/assets/75274611/20277c31-d88c-44ae-b896-1da4223cb392">

Crashes Tab:
<img width="1454" alt="Screenshot 2023-10-25 at 10 57 35"
src="https://github.com/elastic/kibana/assets/75274611/2b0dea23-cbab-4e68-a14a-c3b14d4bd860">


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Katerina <[email protected]>
  • Loading branch information
3 people authored and dedemorton committed Aug 6, 2024
1 parent 65a2587 commit 0f449f7
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 1 deletion.
3 changes: 3 additions & 0 deletions how-to-guides.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Learn how to perform common APM app tasks.
* <<correlations>>
* <<agent-explorer>>
* <<machine-learning-integration>>
* <<mobile-session-explorer>>
* <<apm-lambda>>
* <<advanced-queries>>
* <<storage-explorer>>
Expand All @@ -35,6 +36,8 @@ include::agent-explorer.asciidoc[]

include::machine-learning.asciidoc[]

include::mobile-session-explorer.asciidoc[]

include::lambda.asciidoc[]

include::advanced-queries.asciidoc[]
Expand Down
Binary file added images/mobile-session-error-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mobile-session-explorer-apm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mobile-session-explorer-nav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mobile-session-filter-discover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions mobile-errors.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[role="xpack"]
[[mobile-errors-crashes]]
=== Mobile errors and crashes

TIP: {apm-guide-ref}/data-model-errors.html[Errors] are groups of exceptions with a similar exception or log message.

The *Errors & Crashes* overview provides a high-level view of errors and crashes that APM mobile agents catch,
or that users manually report with APM agent APIs. Errors and crashes are separated into two tabs for easy differentiation.
Like errors are grouped together to make it easy to quickly see which errors are affecting your services,
and to take actions to rectify them.





[role="screenshot"]
image::apm/images/mobile-errors-overview.png[Mobile Errors overview]

Selecting an error group ID or error message brings you to the *Error group*.

[role="screenshot"]
image::apm/images/mobile-error-group.png[Mobile Error group]

The error group details page visualizes the number of error occurrences over time and compared to a recent time range.
This allows you to quickly determine if the error rate is changing or remaining constant.
You'll also see the "most affected" chart which can be oriented to 'by device' or 'by app version'.

Further down, you'll see an Error sample.
The error shown is always the most recent to occur.
The sample includes the exception message, culprit, stack trace where the error occurred (when available),
and additional contextual information to help debug the issue--all of which can be copied with the click of a button.

In some cases, you might also see a Transaction sample ID.
This feature allows you to make a connection between the errors and transactions,
by linking you to the specific transaction where the error occurred.
This allows you to see the whole trace, including which services the request went through.
4 changes: 3 additions & 1 deletion mobile-service.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ to make data-driven decisions about how to improve your user experience.

For example, see:

* Crash Rate (Crashes per minute) -- coming soon
* Crash Rate (Crashes per session)
* Slowest App load time -- coming soon
* Number of sessions
* Number of HTTP requests
Expand All @@ -28,6 +28,8 @@ of their mobile application environment and the impact of backend errors and bot
Understand the impact of slow application load times and variations in application crash rate on user traffic (coming soon).
Visualize session and HTTP trends, and see where your users are located--enabling you to optimize your infrastructure deployment and routing topology.

Note: due to the way crash rate is calculated (crashes per session) it is possible to have greater than 100% rate, due to fact that a session may contain multiple crashes.

[role="screenshot"]
image::apm/images/mobile-location.png[mobile service overview centered on location map]

Expand Down
43 changes: 43 additions & 0 deletions mobile-session-explorer.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[role="xpack]
[[mobile-session-explorer]]
=== Exploring mobile sessions with Discover
Elastic Mobile APM provides session tracking by attaching a `session.id`, a guid, to every span and event.
This allows for the recall of the activities of a specific user during a specific period of time. The best way recall
these data points is using the xref:document-explorer[Discover document explorer]. This guide will explain how to do that.

=== Viewing sessions with Discover

The first step is to find the relevant `session.id`. In this example, we'll walk through investigating a crash.
Since all events and spans have `session.id` attributes, a crash is no different.

The steps to follow are:

* copy the `session.id` from the relevant document.
* Open the Discover page.
* Select the appropriate data view (use `APM` to search all datastreams)
* set filter to the copied `session.id`

Here we can see the `session.id` guid in the metadata viewer in the error detail view:
[role="screenshot"]
image::images/mobile-session-error-details.png[Example of session.id in error details]

Copy this value and open the Discover page:

[role="screenshot"]
image::images/mobile-session-explorer-nav.png[Example view of navigation to Discover]


set the data view. `APM` selected in the example:

[role="screenshot"]
image::images/mobile-session-explorer-apm.png[Example view of Explorer selecting APM data view]

filter using the `session.id`: `session.id: "<copied session id guid>"`:

[role="screenshot"]
image::images/mobile-session-filter-discover.png[Filter Explor using session.id]

explore all the documents associated with that session id including crashes, lifecycle events, network requests, errors, and other custom events!



0 comments on commit 0f449f7

Please sign in to comment.