Skip to content
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

Demo app: features in readme #568

Merged
merged 15 commits into from
Sep 5, 2024
52 changes: 51 additions & 1 deletion demo-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,58 @@ a quick and dirty example of how to get the agent initialized.

## Features

* TBD
The OpenTelemetry Android Demo App currently supports the following features:

* Android Activity Lifecycle Monitoring
- Automatically captures spans for key lifecycle events:
- Created: Includes `onCreate`, `onStart`, `onResume`,
- Paused: Includes `onPause`,
- Stopped: Includes `onStop`,
- Destroyed: Includes `onDestroy`.
- This covers the entire Activity lifecycle, providing detailed insights into each phase.

* Fragment Lifecycle Monitoring
- Automatically captures spans for key lifecycle events:
- Attached: `onAttach` (fragment attached to context),
- Created: `onCreate`,
- View Created: `onViewCreated` (UI created),
- Started: `onStart`,
- Resumed: `onResume` (fragment active),
- Paused: `onPause`,
- Stopped: `onStop`,
- View Destroyed: `onDestroyView` (UI removed),
- Destroyed: `onDestroy`,
- Detached: `onDetach` (fragment disconnected).
- Provides detailed insights into each lifecycle phase.
- Can be observed in the "About OpenTelemetry Android" activity, entered via "Learn more" on the main screen.

* ANR Detection
- Automatically detects and reports ANRs in the app.
- ANR events are captured as spans with detailed stack traces, providing insights into the exact operations that caused the ANR.
- The span includes key attributes such as `screen.name`, `session.id`, and network information to assist in diagnosing the issue.
- Note: The app currently does not have any features designed to intentionally trigger an ANR.

* Slow Render Detection
- Automatically detects instances of slow rendering within the app.
- Slow render events are captured as spans, providing information on when and where rendering delays occurred.
- The span includes attributes such as `activity.name`, `screen.name`, `count`, and network details to help diagnose performance issues.
- Note: The app currently does not have any features designed to intentionally trigger slow rendering.

* Manual Instrumentation
- Provides access to the OpenTelemetry APIs for manual instrumentation, allowing developers to create custom spans and events as needed.
- Note: The only manual instrumentation that has been added to the demo app so far is an event after clicking on the OpenTelemetry logo.

### Known Gaps
As of now, there are a few areas where the instrumentation might not be comprehensive:

* Crash Reporting
App crashes are automatically reported, but the app currently does not include any features that intentionally trigger crashes.

* HTTP Client Instrumentation
OpenTelemetry Android supports automatic instrumentation for HTTP client libraries. This feature captures spans for HTTP requests with details. However, the demo app does not currently demonstrate this feature as it doesn't make any network requests.

* Disk Buffering
Disk buffering is enabled in the app, allowing telemetry data to be temporarily stored on disk when the network is unavailable. Although this feature is configured, it isn't actively demonstrated due to the absence of network activity.

magda-woj marked this conversation as resolved.
Show resolved Hide resolved
## How to use

Expand Down