Sentry Documentation

repository·master·Indexed 19 days ago

https://github.com/getsentry/sentry-docs

The Next.js implementation of Sentry's official documentation. This repository contains technical guides, developer resources, and the tools used to build and maintain the docs, including MDX components like SplitLayout, OG image generation scripts, and 404 link checking utilities.

Tokens
375.9K
Snippets
1.1K
Records
1.6K
Agent score
65%

What's inside sentry-docs

  1. Overview of the Sentry Android Gradle Plugin

    master

    The Sentry Android Gradle Plugin provides seamless integration with the Gradle build system for Android and Hybrid SDKs (such as React Native and Flutter). It automates several critical error-reporting tasks, including:

    • ProGuard/R8 mappings upload: Automatically uploads mappings to ensure stack traces are de-obfuscated.
    • Java/Kotlin Source Context upload: Uploads source code context to help identify the exact line of an error.
    • Native debug symbols and sources upload: Supports uploading symbols for native code.
    • Auto-instrumentation: Uses bytecode manipulation for tracing.
    • Logcat breadcrumb logging: Automatically captures Logcat events as breadcrumbs.
    • Auto-installation: Automatically installs the Sentry Android SDK and its integrations.
    • External dependencies report: Generates reports on external dependencies.
  2. Overview of Sentry Metrics

    master
    Sentry metrics allow you to track application performance and health using counters, gauges, and distributions. Metrics are ingested as trace_metric envelope items containing JSON-encoded payloads. While the internal envelope type is named trace_metric to avoid collisions with other internal systems, they are referred to as "metrics" from the SDK perspective.
  3. Overview of iOS Size Analysis Insights

    master

    Sentry provides several insights to help identify and reduce the size of iOS app bundles. These insights flag various issues that can be optimized to reduce download size and improve performance:

    InsightWhat it flags
    Strip Debug SymbolsBinaries that include removable debug sections or symbols.
    Duplicate FilesIdentical files where the extras can be removed.
    Image OptimizationOversized PNG/JPEG/HEIC assets and recommends minifying or converting to HEIC.
    Alternate Icon OptimizationAlternate app icons that can be downscaled and recompressed.
    Loose ImagesScaled @1x/@2x/@3x images that should be moved into asset catalogs to qualify for app thinning.
    Small FilesTiny files wasting space because of the 4KB filesystem block size.
    Unnecessary FilesDocs, scripts, configs, or other build leftovers in the bundle.
    Large ImagesImage files that are a good candidate for on-demand delivery.
    Large VideosVideo files that are a good candidate for on-demand delivery.
    Localized StringsLocalized strings that can use a more efficient format.
    Minify Localized StringsLocalized string files that contain removable whitespace and comments.
    Main Binary Export MetadataBinaries that include removable export tries.
    Hermes Debug Info (RN Only)Hermes bytecode files that include removable debug info.
  4. Overview of Sentry CLI

    master

    The sentry-cli command line executable allows you to connect to the Sentry API to manage project data. It is primarily used for:

    • Managing debug information files for iOS and Android.
    • Managing releases.
    • Managing source maps.
    • Managing code mappings for other platforms.
  5. Platform support and requirements for Unreal Engine Session Replay

    master

    Session Replay capture methods and requirements vary significantly by platform:

    PlatformCapture MethodKey Requirements
    WindowsRolling video of backbufferEngine codec plugins (AVCodecsCore + NVCodecs or AMFCodecs) and a plugin rebuild.
    LinuxRolling video of backbufferEngine codec plugins, NVIDIA GPU, and a plugin rebuild.
    macOSRolling video of backbufferEngine codec plugins and a plugin rebuild.
    iOSRolling video of backbufferUnreal Engine 5.8+, engine codec plugins, and a plugin rebuild.
    AndroidPeriodic screenshots stitched to videoStandard Android setup.
    XboxOS-captured gameplay clipDevelopment kits only.

    Note: PlayStation and Nintendo Switch are not currently supported (setting is a no-op).

  6. Automate with Sentry AI (Seer) and Monitors

    master

    Sentry offers automation through AI-driven insights and proactive monitoring:

    • Seer (AI in Sentry): Uses telemetry to explain why code failed, generates merge-ready fixes with Autofix, and performs AI Code Review to catch regressions before merging.
    • Monitors and Alerts:
      • Cron monitors: For scheduled jobs.
      • Uptime monitoring: For endpoints.
      • Alerts: Route notifications to Slack, PagerDuty, or your issue tracker.
    • Releases: Track crash-free sessions, version adoption, and failure rates to identify regressions immediately after a deployment.
  7. Detect issues and user feedback

    master

    Sentry provides several tools to identify problems as they arise:

    • Issues: Automatically captures and groups unhandled exceptions. You can triage, assign, and use Suspect commits to identify the code change responsible for a bug. Requires installing a Sentry SDK and connecting a Source Code Management (SCM) provider.
    • User Feedback: Collect feedback directly from users when they encounter bugs, linking the feedback to specific errors, replays, and tags.
    • Snapshots: Detect unintended visual changes on pull requests via image diffing and CI checks.
    • Size Analysis: Monitor mobile app build sizes to prevent regressions.
  8. Understand iOS Size Analysis Insights

    master

    Size Analysis Insights identify specific opportunities to reduce your iOS app's binary size. They detect patterns such as:

    • Duplicate files: Redundant assets or binaries.
    • Oversized media: Large images or videos that can be compressed.
    • Unneeded assets: Files that are included in the build but not utilized.

    For each identified issue, Sentry provides a list of exactly what needs to be fixed and the estimated size savings you can achieve.

  9. Configure GitHub Integration for Commit Tracking and Issue Management

    master

    The GitHub integration enables several advanced features for connecting your source code to Sentry issues:

    • Commit Tracking: Pinpoint problematic commits by linking them to stack traces.
    • Suspect Commits: Automatically identify the most recent changes to files in a stack trace and suggest the commit author as an assignee.
    • Issue Management: Create and link GitHub issues directly from Sentry.
    • Resolve via Commit/PR: Automatically resolve Sentry issues by including fixes <SENTRY-SHORT-ID> in your commit messages or Pull Request titles/descriptions.
    • Pull Request Comments: Sentry can automatically comment on merged or open PRs to surface suspected issues.
    • Missing Member Detection: Identifies GitHub contributors who are not yet members of your Sentry organization.
    • Stack Trace Linking: Navigates from a stack trace directly to the corresponding file in your GitHub repository.
  10. Overview of Sentry Structured Logs

    master

    Sentry Structured Logs allow you to send text-based log information from frontend or backend applications to Sentry. These logs are searchable, viewable alongside errors, and trace-connected.

    Trace-connected logs mean every log entry is automatically linked to the active trace recorded at that moment. You can click from a log entry directly to the full trace waterfall to see related spans, errors, and other logs from the same request, providing complete execution context.

    Common use cases for logs:

    • Debugging: Cache misses, database connections, query results, performance metrics.
    • User behavior: Login events, checkout flows, feature usage.
    • Application state: Configuration loading, service initialization, connection status.
    • Business events: Order placements, payment processing, notifications.

    Query Window Limits by Plan:

    • Developer: 7 days
    • Team: 14 days
    • Business: 30 days
  11. What is external_propagation_context and how does it work?

    master

    The external_propagation_context is a mechanism used to ensure Trace Connectedness. It allows Sentry to link non-trace events (such as Errors, Check-Ins, Logs, and Metrics) to the active OpenTelemetry trace.

    How it works

    1. Registration: The integration calls register_external_propagation_context(fn) with a function that fetches the current (trace_id, span_id) tuple from the OpenTelemetry SDK.
    2. Retrieval: When Sentry needs to build an event payload, it calls get_external_propagation_context.
    3. Precedence: The Sentry Scope implementation uses the values returned by get_external_propagation_context in preference to the local propagation_context to populate trace_id and span_id in event payloads.

    This ensures that even if an error occurs outside of an explicit OpenTelemetry span, it can still be associated with the correct trace context.