diff --git a/cspell.json b/cspell.json index 1565e7f6..e17ead58 100644 --- a/cspell.json +++ b/cspell.json @@ -275,6 +275,9 @@ "collapsable", "RGBA", "RRGGBB", - "RRGGBBAA" + "RRGGBBAA", + "Dalvik", + "RSSI", + "Passpoint" ] } \ No newline at end of file diff --git a/docs/ai/index.md b/docs/ai/index.md index 6168dd50..42880985 100644 --- a/docs/ai/index.md +++ b/docs/ai/index.md @@ -24,6 +24,8 @@ Connect Bugsee to your AI coding assistants and workflows. Install the Bugsee pl - **Track build health** — check build size, what a release added or removed, size/dependency/timing regressions, and dependency vulnerabilities. - **Keep traces readable** — upload dSYMs, JavaScript source maps, and Android mapping files so production stack traces resolve to your source. +In the dashboard itself, [AI Insights](/dashboard/ai-insights) explains a crash or handled error without an agent: likely root cause, suggested fix, and confidence, optionally grounded in your GitHub or GitLab repository. + ## Get started - New to this? Start with **[Plugins](/ai/plugins)** for a one-step install in your assistant. diff --git a/docs/ai/plugins/index.md b/docs/ai/plugins/index.md index 00395a3f..17d74ae3 100644 --- a/docs/ai/plugins/index.md +++ b/docs/ai/plugins/index.md @@ -11,7 +11,7 @@ The Bugsee plugin gives your AI coding assistant everything it needs to work wit ## What the plugin provides -- **SDK setup skills** — opinionated wizards for iOS, Android (and Android 7.x beta), Flutter, React Native, Unity, .NET/MAUI, Xamarin, Cordova, and Kotlin Multiplatform. Your assistant detects the platform and walks through install, initialization, and configuration. See [Agent Skills](/ai/agent-skills). +- **SDK setup skills** — opinionated wizards for iOS and Android (7.x, plus separate skills for apps still on 6.x), Flutter, React Native, Unity, .NET/MAUI, Xamarin, Cordova, and Kotlin Multiplatform. Your assistant detects the platform and walks through install, initialization, and configuration. See [Agent Skills](/ai/agent-skills). - **Workflow skills** — *fix issues* (triage and root-cause crashes, errors, and bug reports through the MCP server), *build insights* (build size, regressions, and dependency vulnerabilities through the MCP server), and *upload symbols* (dSYMs, JavaScript source maps, Android mapping files). - **MCP server** — connects your assistant to your Bugsee issues and builds at `https://api.bugsee.com/mcp`. See [MCP](/mcp). diff --git a/docs/dashboard/ai-insights.md b/docs/dashboard/ai-insights.md new file mode 100644 index 00000000..f950f3ba --- /dev/null +++ b/docs/dashboard/ai-insights.md @@ -0,0 +1,83 @@ +--- +title: "AI Insights" +description: "Analyze a crash or handled error in the Bugsee dashboard with AI Insights: likely root cause, suggested fix, confidence and the sources it used, optionally grounded in your GitHub or GitLab repository." +sidebar_position: 2 +slug: "/dashboard/ai-insights" +--- + +# AI Insights + +AI Insights analyzes a crash or a handled error and explains it: the most likely root cause, whose code has to change, a suggested fix, and how confident the analysis is. It works from the report alone. Connect the app's GitHub or GitLab repository, read-only, and it also reads the code around the crashing frames. + +:::info[Beta] +AI Insights is in beta. It is available on every plan except Lite, and during a trial. +::: + +## Run an analysis + +1. Open a crash or an error in the dashboard and select the **AI Insights** tab. +2. Optionally check **Notify me when it finishes** to get an email when the analysis is ready or has failed. +3. Click **Request incident analysis**. + +The analysis runs in the background, so you can leave the page. The tab waits for the result for two minutes; if the analysis is still running after that, click **Keep waiting**. + +- **Failed runs.** The tab shows the error and a **Retry incident analysis** button. If a new run fails after an earlier one succeeded, the earlier result stays on screen. +- **Running it again.** Use the **Analyze incident** action on the tab. A new analysis replaces the existing one. +- **One run at a time.** While an analysis is running, requesting another one does not start a second run. + +## What the analysis contains + +| Part | What it says | +| --- | --- | +| Summary and **Root cause** | The most likely reason for the failure. The analysis walks nested causes and quotes the implicated lines when it has source code. Without source, it says so and reasons from the stack, the exception message and the device environment. | +| **Likely origin** | Whose code has to change: **Application code**, **Bugsee SDK**, **System** (nothing the app's author can change, such as an OS or device fault or a kill from outside the process) or **Unknown**. A crash inside platform code that failed on what the app handed it counts as application code. | +| **Confidence** | The model's own rating, from 0 to 100%, of how well the evidence in the report (the stack, the exception message and any source it read) supports the stated cause. A high value means the evidence shows the cause directly; a low value means the cause is inferred and other causes could look the same. It is an estimate, not a measured probability. | +| **Implicated files** | Files named in the stack, the source excerpts or the exception message. | +| **Suggested fix** | What to change in your app's code. When the fix is in a file Insights read from your repository, it can be shown as a diff: only when the lines it replaces appear exactly once in the code that was read, and the replacement is at most 20 lines. Otherwise the fix is described in prose. | +| **Bugsee SDK** | Notes on Bugsee's own SDK, when it is involved. Such reports are also marked **Bugsee SDK involved**. | +| **Sources** | The source files the analysis used. Files from your repository link to them in your provider, at the revision that was read. Android platform files link to the Android Open Source Project (AOSP). Bugsee SDK files are listed by path. | + +## What it reads + +To produce the analysis, AI Insights sends an AI model the following, and nothing else from the report: + +- the report's environment record (device, OS and app details) with the device identifiers removed, plus the wrapper (runtime) and Bugsee SDK type, version and build; +- whether Bugsee flagged the report as an error in its own SDK; +- the report's summary and description; +- how the report was triggered: trigger, mechanism and origin; +- the exception: crash or handled error, the signal name and code, the reason or message, and the stack trace with its nested causes (or the crashed thread's stack when there is no exception); +- for native crashes, the machine code around the crashing instruction, decoded, when the SDK captured it; +- when a repository is connected: its provider, its name, and the revision that was read; +- when Bugsee SDK frames were matched against Bugsee's own debug symbols: details of those symbols (SDK version, format, image UUIDs); +- source excerpts around the frames in the stack: from your repository when one is connected, from the Bugsee SDK (at the version that produced the report) when SDK frames are in the stack, and from AOSP (at the device's OS release) for Android platform frames; +- up to 40 recent log entries from the report (only error entries when there are any), at most 24 KB. + +The report must include crash data; without it, the analysis fails with *Crash data was not available*. + +## Connect a source repository + +People who can modify the app connect its repository in the app's settings, under **Source repository**, or from the **AI Insights** tab with **Set up source repository**. Click **Setup** and choose a provider: + +- **GitHub.** Install the **Bugsee AI Insights** GitHub App, with read-only access (Contents: Read and Metadata: Read). You sign in so Bugsee can list the installations you can see. Bugsee does not keep your GitHub user token after setup; Insights reads files with a short-lived installation token. +- **GitLab.** Authorize with OAuth and the `read_api` scope, which lists your projects and reads files. Insights stores a refresh token for the app. Use a bot or service account if you do not want to use a personal login. +- **Access token.** If you prefer a token to an app connection, choose **Use an access token instead**, leave **Clone URL** blank, and enter the **Repository** and the **Access token**. The token needs only read access: Insights uses it to read the repository's metadata, branches and files, the same calls the app connections make with Contents: Read and Metadata: Read on GitHub and `read_api` on GitLab. + +Then pick the **Default branch** and, if the app's source lives in a subdirectory of the repository, a **Path prefix**. **Disconnect** in the same panel removes the connection. + +### Which revision is read + +Insights reads the code that shipped, trying in this order: + +1. the commit SHA of the matching build (same app version and build number), when that build was registered with Bugsee with a commit SHA (see [`vcs-metadata`](/cli/metadata#vcs-metadata)); +2. a git tag that matches the app version, with or without a leading `v`; +3. the default branch. + +## Monthly limit + +Each request that starts an analysis counts toward a monthly limit for the organization, set by its plan. That includes runs that fail and retries; a request is refunded only when Bugsee cannot schedule the run at all. Once the limit is reached, the dashboard shows *Your organization account has reached the maximum number of AI Insights requests allowed per month (N)*, with N the limit, until the next calendar month. Contact Bugsee support to raise it. + +## Bug reports: UI/UX analysis + +For a bug report, the **AI Insights** tab offers a UI/UX analysis instead: click **Request UI/UX analysis**. It reviews frames from the video recorded before the report, the screenshot (including annotations the user drew), and the report's summary and description, and describes what most likely led the user to file the report. It counts toward the same monthly limit. + +The analysis needs the report's video. For a report without one, no analysis is produced, but the request still counts toward the limit; after 60 seconds the tab stops waiting and suggests reloading the page later. diff --git a/docs/dashboard/release-health.md b/docs/dashboard/release-health.md new file mode 100644 index 00000000..a8d7c1eb --- /dev/null +++ b/docs/dashboard/release-health.md @@ -0,0 +1,59 @@ +--- +title: "Release health" +description: "How Bugsee computes crash-free sessions and crash-free users on an app's Overview page: what counts as a session, a user and a crash, how versions and builds are grouped, and how days are bucketed." +sidebar_position: 1 +slug: "/dashboard/release-health" +--- + +# Release health + +An app's **Overview** page in the dashboard tracks how stable each release is, day by day. Open the app and select **Overview**, the first item in its navigation (`https://app.bugsee.com/#/apps//overview`). The **Stability** chart shows two lines, **Crash-free sessions** and **Crash-free users**, next to the **Sessions**, **Users** and **Crashes** charts they are computed from. Filter by app version and build to compare releases. + +## Crash-free sessions and users + +| Metric | How it is computed | +| --- | --- | +| **Crash-free sessions** | (sessions − crashes) ÷ sessions, as a percentage | +| **Crash-free users** | (users − crashed users) ÷ users, as a percentage | + +Both are computed per day and rounded to one decimal place. A result below zero shows as 0%. A day with no sessions (or no users) shows 100%. + +## What counts + +- **Session.** Counted each time the Bugsee SDK on a device opens a session with Bugsee. Sessions opened from simulators and emulators, and from devices Bugsee recognizes as Apple or Google app review devices, are not counted. +- **User.** A device. Each device counts once per day. **New users** are devices Bugsee sees for the first time. +- **Crash.** Each crash report counts as one crash, on the day the report was created. If that time is in the future or more than a month in the past, the day Bugsee received the report is used instead. Crash reports count from any device, simulators and review devices included. +- **Crashed user.** A device that sent at least one crash report that day, counted once per app version and build. + +Handled errors and bug reports have their own charts (**Handled errors** and **Bugs**) and never count as crashes. + +A report of any kind (crash, handled error or bug report) can also add one session and one user to its own day. It does so when the device's record in Bugsee was last updated on a different day; opening a session and sending a report both update that record. So handled errors and bug reports can raise the session and user counts, and with them the crash-free numbers. + +## Versions and builds + +Bugsee groups the numbers by the app version and build that the SDK reports: `CFBundleShortVersionString` and `CFBundleVersion` on iOS, `versionName` and `versionCode` on Android. + +- **All versions** (the default) shows the whole app. +- Pick a version to see only that version. With a version selected, pick a build to narrow it further, or keep **All builds**. + +Versions are listed newest first. When every version consists of one to three numeric parts (such as `2`, `2.1` or `2.1.3`), they are ordered by version number. A single version with a suffix (`1.0.0-beta`) or a fourth part (`1.2.3.4`) switches the whole list to the order in which the versions first appeared. + +With **All versions** selected, the user counts are the app's daily totals. A device that updates during a day counts toward both versions, so per-version user counts can add up to more than the total. + +The **Version adoption** chart shows each version's share of the day's users. + +## Time range and days + +Choose **Last 7 days**, **Last 30 days**, **Year**, **All** or **Custom period**. The charts need at least 3 days; a shorter custom period shows no statistics. + +Days start at midnight in the app's time zone, shown under the filters (for example, *Days start at midnight (GMT+2)*). Set it in the app's settings, under **General** → **Timezone**. The time zone is a fixed offset from GMT with no daylight saving time, so in a region that observes daylight saving time, days start an hour away from local midnight for part of the year. + +Bugsee fixes the day of each entry when it receives it: a session counts on the day it is received, a report on the day it was created (see [What counts](#what-counts)), both in the time zone set at that moment. Changing the time zone affects only data received after the change. + +## Sharing the Overview page + +An organization admin can make an app's Overview page visible to people without a Bugsee account. In the app's settings, under **Sharing**, turn on **Overview sharing** and copy the **Shared overview URL**. + +## All apps at once + +The **Cross-application overview**, the row at the top of the applications list (`https://app.bugsee.com/#/apps/_global/overview`), charts **Crash-free sessions** and **Crash-free users** for several apps side by side, computed the same way across all versions of each app. diff --git a/docs/index.md b/docs/index.md index 5c559391..f81d679c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,6 +18,11 @@ Using Bugsee on mobile devices requires installation of Bugsee lightweight SDK: * [Installing KMP SDK (Beta)](/sdk/kmp/installation/) * [Installing Xamarin SDK](/sdk/xamarin/installation/) — **deprecated**, use the [.NET SDK](/sdk/dotnet/installation/) for new projects +Bugsee also has SDKs outside mobile. They are not covered on this site yet; see their repositories: + +* **JavaScript SDK (Beta)**: browsers, Node.js and other JavaScript runtimes, with session replay in the browser. Published on npm as [`@bugsee/bugsee`](https://www.npmjs.com/package/@bugsee/bugsee) and related `@bugsee/*` packages; source at [github.com/bugsee/bugsee-javascript](https://github.com/bugsee/bugsee-javascript). +* **Rust SDK (Preview)**: a pre-release, not yet published to crates.io; source at [github.com/bugsee/bugsee-rust](https://github.com/bugsee/bugsee-rust). + ## Features diff --git a/docs/sdk/android/breadcrumbs.mdx b/docs/sdk/android/breadcrumbs.mdx index d776349d..494ee8e9 100644 --- a/docs/sdk/android/breadcrumbs.mdx +++ b/docs/sdk/android/breadcrumbs.mdx @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; This page documents the Bugsee Android SDK **7.x**. For the previous major version, see [Adding custom data](/sdk/android/v6/custom). -Breadcrumbs are small contextual entries that record the sequence of events leading up to an issue — navigation, taps, lifecycle changes, network requests, and system events. They are aggregated into the report timeline and surface in the Bugsee dashboard. The SDK captures four built-in breadcrumb sources (app, UI, network, and system) automatically; to disable collection, scrub, or drop them, see [Privacy → Breadcrumbs](/sdk/android/privacy/breadcrumbs). +Breadcrumbs are small contextual entries that record the sequence of events leading up to an issue — navigation, taps, lifecycle changes, network requests, and system events. They are aggregated into the report timeline and surface in the Bugsee dashboard. The SDK has four built-in breadcrumb sources (app, UI, network, and system). Breadcrumb capture is off by default: turn it on with the `CaptureBreadcrumbs` option, which custom breadcrumbs need too. To enable collection, or to scrub or drop entries, see [Privacy → Breadcrumbs](/sdk/android/privacy/breadcrumbs). ## Recording custom breadcrumbs diff --git a/docs/sdk/android/configuration/overview.mdx b/docs/sdk/android/configuration/overview.mdx index 15bc268a..0b131796 100644 --- a/docs/sdk/android/configuration/overview.mdx +++ b/docs/sdk/android/configuration/overview.mdx @@ -235,11 +235,11 @@ See [Performance monitoring](/sdk/android/performance) for the APM overview. | `Options` constant | Manifest key | Type | Default | Description | | --- | --- | --- | --- | --- | | `PerformanceMonitoring` | `com.bugsee.option.performance.enabled` | boolean | `true` | Master switch for performance monitoring (APM). | -| `PerformanceSampleRate` | `com.bugsee.option.performance.sample-rate` | float `[0, 1]` | `0.01` | Probability that a transaction is sampled for standalone APM upload. Does not affect capture — every transaction still flows into the report pipeline. | -| `PerformanceUploadMode` | `com.bugsee.option.performance.upload-mode` | String | `"batched"` | How standalone APM data is uploaded: `"batched"` (30 s flush) or `"realtime"`. | -| `PerformanceAdaptiveSampling` | `com.bugsee.option.performance.adaptive-sampling` | boolean | `true` | On top of the static sample rate, promote "interesting" unsampled transactions — scored at finish by status, duration outlier-ness, and span-tree complexity — into the upload pipeline. | +| `PerformanceSampleRate` | `com.bugsee.option.performance.sample-rate` | float `[0, 1]` | `0.01` | Probability that a transaction is sampled for a standalone APM upload, which is not active yet. Does not affect capture — every transaction still flows into the report pipeline. | +| `PerformanceUploadMode` | `com.bugsee.option.performance.upload-mode` | String | `"batched"` | How the standalone APM upload would send data: `"batched"` (30 s flush) or `"realtime"`. Not active yet. | +| `PerformanceAdaptiveSampling` | `com.bugsee.option.performance.adaptive-sampling` | boolean | `true` | On top of the static sample rate, promote "interesting" unsampled transactions — scored at finish by status, duration outlier-ness, and span-tree complexity — into the standalone upload. Not active yet. | -`PerformanceUploadMode` accepts `"batched"` (30 s flush) or `"realtime"`. `PerformanceSampleRate` gates **standalone APM uploads only** — every transaction still flows into the capture pipeline for reports regardless of sampling. `PerformanceAdaptiveSampling = true` turns the sample rate into a floor rather than a fixed probability — scored transactions are promoted on top of the random draw. +The standalone APM upload that `PerformanceSampleRate`, `PerformanceAdaptiveSampling`, and `PerformanceUploadMode` configure is not active yet (as of 7.6.0): the SDK accepts these options, but they do not change which transactions are captured or sent. Performance data reaches Bugsee only inside reports — every transaction flows into the capture pipeline for reports regardless of sampling. See [Where performance data goes](/sdk/android/performance#where-performance-data-goes). ## Enum reference diff --git a/docs/sdk/android/events-and-traces.mdx b/docs/sdk/android/events-and-traces.mdx index bb5e1e08..994ca1e8 100644 --- a/docs/sdk/android/events-and-traces.mdx +++ b/docs/sdk/android/events-and-traces.mdx @@ -82,3 +82,26 @@ Bugsee.trace("logged_in", true) + +## System traces + +Besides your own traces, every report carries traces that the SDK records on its own while it runs. They need no code and no option. Some depend on the device's Android version: + +| Trace | What it shows | Android version | +| --- | --- | --- | +| CPU | The app process's CPU usage. | All | +| Memory | JVM and native heap (total, free, used), the process's native, Dalvik, other and total memory, the device's total, available and advertised memory, and the low-memory state. | All | +| Power | Battery level, charging state and source, and power saving. | All | +| Connectivity | The active connection type (Wi-Fi, cellular, Ethernet, Bluetooth and others). | All | +| Wi-Fi | Whether Wi-Fi is on, RSSI and signal level, link speed and bandwidth, frequency, Passpoint provider names, the local IP address and the MAC address, and the network name (SSID) and BSSID, each when Android returns it to the app. The Wi-Fi standard and maximum link speeds need Android 11 (API 30), the security type Android 13 (API 33). No option turns these fields off. | All | +| Cellular | For each SIM: network type, data connection state, operator name, MCC and MNC, roaming state and signal strength. | All | +| Bluetooth, NFC | Bluetooth and NFC state. | All | +| App and screen | Foreground or background, the current activity, orientation, screen brightness, the connected displays, and accessibility state. | All | +| Sound volume | Volume level of each audio stream. | All | +| Capture | Whether recording is active, in a blackout, or in a partial blackout. | All | +| Frame rate, fold state | Frame rate; fold state on foldable devices. | 7.0 (API 24) and later | +| Hinge angle | The hinge angle, on foldable devices with a hinge-angle sensor. | 11 (API 30) and later | +| Thermal state | The device's thermal status. | 10 (API 29) and later | +| Disk space, thermal headroom | Free and total storage; thermal headroom. | 11 (API 30) and later | +| Game mode | The Android Game Mode the system applies to the app (`unsupported` for apps the system does not treat as games). | 12 (API 31) and later | +| Satellite | Whether the satellite modem is on. Needs a phone-state permission that the SDK does not request; without one the trace reports it as unavailable. | 16 (API 36) and later | diff --git a/docs/sdk/android/extensibility/custom-extensions.mdx b/docs/sdk/android/extensibility/custom-extensions.mdx index 1e5a4e16..38e61f15 100644 --- a/docs/sdk/android/extensibility/custom-extensions.mdx +++ b/docs/sdk/android/extensibility/custom-extensions.mdx @@ -222,7 +222,7 @@ Required methods: | `void stop()` | When the performance coordinator is stopped | | `boolean isRunning()` | Optional. Default returns `true` between `launch` and `stop` | -Inside `launch`, store the `SpanFactory` reference. Whenever your provider observes a measurable operation, call `spanFactory.startSpan(...)` or `spanFactory.startTransaction(...)`, then `finish()` on the returned `Span` / `Transaction` when the operation completes. The coordinator routes finished transactions into the capture pipeline (so they appear in reports) and, separately, into the standalone APM upload queue (subject to the `PerformanceSampleRate` option). +Inside `launch`, store the `SpanFactory` reference. Whenever your provider observes a measurable operation, call `spanFactory.startSpan(...)` or `spanFactory.startTransaction(...)`, then `finish()` on the returned `Span` / `Transaction` when the operation completes. The coordinator routes finished transactions into the capture pipeline, so they appear in reports. A separate standalone APM upload, subject to the `PerformanceSampleRate` option, is not active yet. ### Registration @@ -263,7 +263,7 @@ Providers added *after* `BugseePerformanceCoordinator.launch()` are **not** auto ### Sampling boundary -The `PerformanceSampleRate` option gates **standalone APM uploads** only. Every transaction still flows into the capture pipeline so APM data shows up in issue reports regardless of sampling. `NoOpTransaction` is returned only when `PerformanceMonitoring` is disabled outright — never as a side-effect of sampling. +The `PerformanceSampleRate` option gates only the **standalone APM upload**, which is not active yet. Every transaction still flows into the capture pipeline so APM data shows up in issue reports regardless of sampling. `NoOpTransaction` is returned when `PerformanceMonitoring` is disabled, and before the SDK is launched or after it is stopped — never as a side-effect of sampling. ### Built-in example diff --git a/docs/sdk/android/faq.md b/docs/sdk/android/faq.md index e0363472..59e13ac9 100644 --- a/docs/sdk/android/faq.md +++ b/docs/sdk/android/faq.md @@ -113,7 +113,7 @@ Details in the [network client docs](/sdk/android/network) and the [migration gu Application Performance Monitoring is included in the core SDK at no extra cost. It is enabled by default. -The capture path is designed for minimal overhead: spans use volatile fields and a lock-free dispatcher, provider callbacks run in try/catch isolation, and context propagation is thread-local. The stand-alone APM upload pipeline is sampled (`Options.PerformanceSampleRate`, default `0.01`); sampling gates only uploads, not capture into bug reports. +The capture path is designed for minimal overhead: spans use volatile fields and a lock-free dispatcher, provider callbacks run in try/catch isolation, and context propagation is thread-local. Performance data reaches Bugsee inside bug reports. A standalone APM upload, sampled by `Options.PerformanceSampleRate` (default `0.01`), is not active yet, so sampling does not change which transactions are sent; it never affects capture into bug reports. If you need to disable APM entirely, set `Options.PerformanceMonitoring` to `false` — the public `startSpan` / `startTransaction` APIs then return zero-allocation no-op implementations. diff --git a/docs/sdk/android/migration.mdx b/docs/sdk/android/migration.mdx index 1cc0ccb1..7102fb5f 100644 --- a/docs/sdk/android/migration.mdx +++ b/docs/sdk/android/migration.mdx @@ -865,10 +865,10 @@ try { -APM is enabled by default. Tune it via `Options.PerformanceMonitoring`, `Options.PerformanceSampleRate`, and `Options.PerformanceUploadMode`. +APM is enabled by default. Turn it off with `Options.PerformanceMonitoring`. :::note -Sampling only gates the **standalone APM upload pipeline**. Every transaction is always recorded into the capture buffer used for issue reports. +`Options.PerformanceSampleRate`, `Options.PerformanceAdaptiveSampling`, and `Options.PerformanceUploadMode` are reserved for a standalone APM upload that is not active yet; they do not change which transactions are captured or sent. Every transaction is recorded into the capture buffer used for issue reports. See [Where performance data goes](/sdk/android/performance#where-performance-data-goes). ::: ### 9.4 Custom network events (`addNetworkEvent`) diff --git a/docs/sdk/android/overview.mdx b/docs/sdk/android/overview.mdx index 386d31ba..c5de490e 100644 --- a/docs/sdk/android/overview.mdx +++ b/docs/sdk/android/overview.mdx @@ -19,7 +19,8 @@ Every report carries a synchronized timeline of the session that led up to it: - **Video** — a rolling recording of the screen, with [sensitive views and WebView content redacted](/sdk/android/privacy/video). - **Network** — HTTP requests and responses from [OkHttp, Ktor, Cronet, and in-WebView traffic](/sdk/android/network), with [filtering and scrubbing](/sdk/android/privacy/network). - **Logs** — your app's logs and `logcat`; see [Logs](/sdk/android/logs). -- **Breadcrumbs** — navigation, taps, and system events leading up to the issue; see [Breadcrumbs](/sdk/android/privacy/breadcrumbs). +- **Breadcrumbs** (opt-in) — navigation, taps, and system events leading up to the issue; see [Breadcrumbs](/sdk/android/privacy/breadcrumbs). +- **System traces** — CPU, memory, battery, connectivity, frame rate, thermal state, and more, recorded automatically; see [System traces](/sdk/android/events-and-traces#system-traces). - **Performance (APM)** — [transactions and spans](/sdk/android/performance) for app start, screens, network, and I/O. ## What Bugsee detects diff --git a/docs/sdk/android/performance.mdx b/docs/sdk/android/performance.mdx index b49efaef..1c0eb865 100644 --- a/docs/sdk/android/performance.mdx +++ b/docs/sdk/android/performance.mdx @@ -1,6 +1,6 @@ --- title: "Performance monitoring" -description: "Application performance monitoring (APM) with transactions, spans, built-in providers, sampling, and upload modes in Bugsee Android SDK 7.x." +description: "Application performance monitoring (APM) with transactions, spans, built-in providers, and sampling options in Bugsee Android SDK 7.x." sidebar_position: 13 slug: "/sdk/android/performance" --- @@ -176,19 +176,19 @@ Set the terminal status via `finish(SpanStatus)` (or `setStatus` before calling ## Sampling and upload modes -APM emits two independent data streams — see [Two data paths](#two-data-paths) below — which are controlled by four options: +Four options control APM: | Option | Default | Purpose | | --- | --- | --- | | `PerformanceMonitoring` | `true` | Master switch. When `false`, `startTransaction`/`startSpan` return no-op instances and no provider runs. | -| `PerformanceSampleRate` | `0.01` | Probability (0.0–1.0) that a completed transaction is uploaded through the standalone APM pipeline. Does **not** affect whether transactions appear in issue reports. When `PerformanceAdaptiveSampling` is on, this acts as a floor: transactions that lose the random draw can still be promoted on merit. | -| `PerformanceAdaptiveSampling` | `true` | Adaptive sampling — transactions that lost the random draw are scored at finish time on status, duration outlier-ness, and span-tree complexity, and sufficiently "interesting" ones are promoted into the upload pipeline. Set to `false` to keep `PerformanceSampleRate` as a fixed probability. _New in 7.0.0._ | -| `PerformanceUploadMode` | `"batched"` | How sampled transactions are uploaded. `"batched"` flushes on a 30-second interval; `"realtime"` uploads as soon as a transaction finishes. | +| `PerformanceSampleRate` | `0.01` | Probability (0.0–1.0) that a transaction is sampled for a standalone APM upload, which is not active yet. It does **not** affect whether transactions appear in issue reports: every transaction is captured either way. | +| `PerformanceAdaptiveSampling` | `true` | Lets the standalone upload also keep transactions that lost the random draw but look interesting, scored at finish time on status, duration outlier-ness, and span-tree complexity. Not active yet either: while the upload is off, the SDK does not score transactions. _New in 7.0.0._ | +| `PerformanceUploadMode` | `"batched"` | How the standalone upload would send sampled transactions: `"batched"` on a 30-second interval, `"realtime"` as soon as a transaction finishes. Accepted, but not active yet. | All four options can be set programmatically via the `Bugsee.launch(...)` options map or via manifest metadata. See [Configuration](/sdk/android/configuration) for the mapping between `Options.*` constants and `com.bugsee.option.performance.*` manifest keys. -## Two data paths +## Where performance data goes -:::note -Every transaction is recorded into the capture buffer used for issue reports, regardless of `PerformanceSampleRate`. Sampling only gates the **standalone APM upload pipeline**. That means low sample rates keep APM storage costs down without losing performance context inside bug reports. -::: +Performance data reaches Bugsee **with reports**. Every transaction is recorded into the capture buffer used for issue reports, regardless of `PerformanceSampleRate`. + +Transactions are not sent on their own. The standalone APM upload that `PerformanceSampleRate`, `PerformanceAdaptiveSampling`, and `PerformanceUploadMode` are meant for is not active yet (as of 7.6.0): the SDK accepts the three options, but they do not change which transactions are captured or sent. `Transaction.isSampled()` reports the result of the random draw made when the transaction started. Each transaction in a report also records that result and the sample rate, as the `bugsee.sampled` and `bugsee.sample_rate` attributes of its root span. diff --git a/docs/sdk/android/privacy/breadcrumbs.mdx b/docs/sdk/android/privacy/breadcrumbs.mdx index abc3bba5..d7332a7f 100644 --- a/docs/sdk/android/privacy/breadcrumbs.mdx +++ b/docs/sdk/android/privacy/breadcrumbs.mdx @@ -25,18 +25,18 @@ The SDK ships four built-in breadcrumb sources: | **Network** | HTTP request lifecycle entries — host, path, method, status, mechanism. | | **System** | Connectivity, battery, thermal, orientation, configuration changes. | -Breadcrumb capture is on by default and is gated by the `CaptureBreadcrumbs` option — see [configuration](/sdk/android/configuration). +Breadcrumb capture is **off by default**. Turn it on with the `CaptureBreadcrumbs` option — see [configuration](/sdk/android/configuration). -## Disabling breadcrumb collection +## Turning breadcrumb collection on -To turn off breadcrumb capture entirely, set `CaptureBreadcrumbs` to `false` in your manifest or programmatically: +To capture breadcrumbs, set `CaptureBreadcrumbs` to `true` in your manifest or programmatically: ```xml + android:value="true" /> ``` -Most apps should keep capture on and use the filter below to scrub or drop only the entries that matter. +With the option off, nothing is recorded, including breadcrumbs you add with `Bugsee.addBreadcrumb(...)`. Once capture is on, use the filter below to scrub or drop the entries that matter. ## Filtering breadcrumbs diff --git a/docs/sdk/ios/events-and-traces.mdx b/docs/sdk/ios/events-and-traces.mdx index 0bcc8495..444e5581 100644 --- a/docs/sdk/ios/events-and-traces.mdx +++ b/docs/sdk/ios/events-and-traces.mdx @@ -108,6 +108,35 @@ Bugsee.captureViewHierarchy() this call. - Each snapshot adds to the size of the report, more so for deep hierarchies. +## System traces + +Besides your own traces, every report carries traces that the SDK records on its own while it +runs. They need no code. CPU, memory, queue latency and frame rate are sampled about once a +second while the app is in the foreground; that sampling pauses in the background. The others are +recorded when they change. + +| Recorded by default | What it shows | +| --- | --- | +| CPU | The app's CPU usage. | +| Memory | The app's resident, virtual and footprint memory, the memory still available to it, the device's total memory, and whether the system reports memory pressure. | +| Queue latency | Latency of the main queue and of the high, default, low and background global queues. | +| Power and thermal | Battery level and charging state, Low Power Mode, and the thermal state. | +| Network | Network reachability. | +| Cellular | For each SIM: the radio technology and whether it has a data connection. Bugsee does not link CoreTelephony; unless your app loads it, the trace reports cellular as unavailable. The carrier name, MCC and MNC are recorded only with `BugseeOptionCaptureDeviceAndNetworkNames`. Not on tvOS or visionOS. | +| App and screen | Foreground or background, the current view controller, orientation and screen brightness (not on tvOS or visionOS), the connected displays, and the frame rate. | +| Accessibility | Whether VoiceOver or Switch Control is running. | +| NFC | Whether the device can read NFC tags. Recorded only if your app links CoreNFC. | +| Capture | Whether recording is active or in a blackout. With `BugseeOptionCaptureDiskSpace` on, also the low and no disk space states; see [Disk space](/sdk/ios/configuration#disk-space). | +| Fold state | Fold state and hinge angle, on devices that report them. Not on tvOS or visionOS. | + +These are recorded only when you turn on their option: + +| Trace | Option | Notes | +| --- | --- | --- | +| Disk space | `BugseeOptionCaptureDiskSpace` | Free and total disk space. See [Disk space](/sdk/ios/configuration#disk-space). | +| Bluetooth | `BugseeOptionCaptureBluetoothStatus` | Bluetooth state. Your `Info.plist` must contain `NSBluetoothAlwaysUsageDescription`, and the app must already have Bluetooth permission: Bugsee never asks for it. Without the permission, the trace records the state as unknown or unauthorized. | +| Wi-Fi | `BugseeOptionCaptureDeviceAndNetworkNames` | The Wi-Fi network name (SSID) and BSSID. iOS returns them only to an app with the Wi-Fi information entitlement (and, from iOS 13, location permission). Not on tvOS or visionOS. | + ## Related pages - [Breadcrumbs](/sdk/ios/breadcrumbs) diff --git a/docs/sdk/ios/overview.mdx b/docs/sdk/ios/overview.mdx index 0364b49d..94c28607 100644 --- a/docs/sdk/ios/overview.mdx +++ b/docs/sdk/ios/overview.mdx @@ -17,6 +17,7 @@ Every report carries a synchronized timeline of the session that led up to it: - **Network** — `URLSession` requests and responses, WebSocket traffic and in-WebView traffic; see [Network events](/sdk/ios/network/), with [redaction and filtering](/sdk/ios/privacy/network/). - **Console logs** — `print`, `NSLog`, CocoaLumberjack and your own lines; see [Console logs](/sdk/ios/logs/). - **Breadcrumbs** (opt-in) — navigation, taps and system events leading up to the issue; see [Breadcrumbs](/sdk/ios/breadcrumbs/). +- **System traces** — CPU, memory, battery, network, frame rate, thermal state and more, recorded automatically; see [System traces](/sdk/ios/events-and-traces/#system-traces). - **Your own data** — [events and traces](/sdk/ios/events-and-traces/), a [user identifier and attributes](/sdk/ios/user-session-data/), and attachments added in the [report handler](/sdk/ios/report-handler/). - **Performance (APM)** — [transactions and spans](/sdk/ios/performance/) for app start, screens, network and file I/O. diff --git a/docs/sdk/react_native/performance.mdx b/docs/sdk/react_native/performance.mdx index 6cb6b620..ab1228ca 100644 --- a/docs/sdk/react_native/performance.mdx +++ b/docs/sdk/react_native/performance.mdx @@ -116,7 +116,7 @@ Call `finish` on these objects too: it releases the resources they hold. | `finished` | `boolean` | Whether the span has finished. | | `attributes` | object | The attributes. | | `name` | `string` | Transaction only: the transaction name. | -| `sampled` | `boolean` | Transaction only: whether the transaction won the sample-rate draw when it started (see [Sampling](#sampling)). In this beta the value has no effect, because the standalone upload is not active. It is read once at start and never updated: a transaction that adaptive sampling promotes when it finishes still reads `false`. | +| `sampled` | `boolean` | Transaction only: whether the transaction won the sample-rate draw when it started (see [Sampling](#sampling)). It is read once at start and never updated. On iOS, adaptive sampling can still mark the transaction sampled when it finishes, and this property keeps reading `false`; on Android, adaptive sampling does not run while the standalone upload is inactive. | The properties are read when the object is created and then follow the changes you make through it. They are not read again. @@ -214,7 +214,7 @@ options.setCustomOption('com.bugsee.option.performance.sample-rate', 0.1); Bugsee.launch('', options); ``` -Performance data reaches Bugsee **with reports**: the captured transactions are written into every report. In this beta, transactions are not sent on their own, on either platform: the standalone APM upload that the sampling options are meant for is not active. The sample rate therefore changes nothing that is sent today; only `com.bugsee.option.performance.enabled` does. +Performance data reaches Bugsee **with reports**: the captured transactions are written into every report. In this beta, transactions are not sent on their own, on either platform: the standalone APM upload that the sampling options are meant for is not active. The sample rate therefore does not change which transactions are captured or sent; only `com.bugsee.option.performance.enabled` does. On Android, each transaction in a report records the result of its draw and the sample rate (`bugsee.sampled`, `bugsee.sample_rate`). ## Related pages diff --git a/sidebars.ts b/sidebars.ts index 4e4b6c33..d154fb65 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1224,6 +1224,12 @@ const sidebars: SidebarsConfig = { collapsed: true, items: [ { type: "doc", id: "dashboard/search", label: "Search" }, + { + type: "doc", + id: "dashboard/release-health", + label: "Release health", + }, + { type: "doc", id: "dashboard/ai-insights", label: "AI Insights" }, { type: "category", label: "Accounts",