sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

All SDK Options are documented in user facing docs

Open philipphofmann opened this issue 2 weeks ago • 4 comments

Description

Ensure that all options in Options.swift are also documented in the user-facing Options doc, including SentryExperimentalOptions.

philipphofmann avatar Dec 09 '25 10:12 philipphofmann

COCOA-1077

linear[bot] avatar Dec 09 '25 10:12 linear[bot]

@philprime, I think you already did some work here. Can you please link some related PRs and maybe write a short update what is still missing?

philipphofmann avatar Dec 09 '25 10:12 philipphofmann

These are my recent contributions to the sentry-docs:

  • https://github.com/getsentry/sentry-docs/pull/15667
  • https://github.com/getsentry/sentry-docs/pull/15658
  • https://github.com/getsentry/sentry-docs/pull/15657
  • https://github.com/getsentry/sentry-docs/pull/15638
  • https://github.com/getsentry/sentry-docs/pull/15669

At this point it is necessary to perform an (LLM-assisted) analysis to figure out a list of changes which are missing.

philprime avatar Dec 10 '25 08:12 philprime

I performed a quick analysis using the following prompt:

I need you to perform an analysis of the documentation for the Apple SDK/Cocoa SDK for Apple platforms. Specifically we need to check if the documented options are complete.

Find the relevant files in the docs/platforms/apple/configuration and compare it to the options available in /Volumes/Developer/getsentry/sentry-cocoa/Sources/Swift/Options.swift and related files. Then create me a markdown todo list so I can add it to an existing GitHub issue as sub issues.

As a reference, we already have an open PR for screenshot options https://github.com/getsentry/sentry-docs/pull/15658

A similar prompt can also be used to automate this process.

Result

Reference: Comparison between sentry-docs/docs/platforms/apple/common/configuration/ and getsentry/sentry-cocoa/Sources/Swift/Options.swift

Core Options

  • [ ] Document enabled option in main options.mdx - Controls whether SDK should send events to Sentry (default: true)
    Note: Only mentioned in migration/index.mdx, should be in main options page

  • [ ] Document shutdownTimeInterval option - Controls flush duration when calling SentrySDK.close() (default: 2.0 seconds)
    Status: NOT FOUND in any docs

  • [ ] Document enableCrashHandler option in main options.mdx - When enabled, SDK sends crashes to Sentry (default: true)
    Note: Mentioned in watchdog-terminations.mdx but should be in main options page

  • [ ] Document beforeSendSpan callback - Callback to drop or modify a span before sending to Sentry
    Status: NOT FOUND in Apple docs (only documented in JavaScript docs)

  • [ ] Document enableLogs option in main options.mdx - When enabled, SDK sends logs to Sentry (default: false)
    Note: Mentioned in migration/index.mdx but should be in main options page

  • [ ] Document beforeSendLog callback - Callback to drop or modify a log before sending to Sentry
    Status: NOT FOUND in any docs

  • [ ] Document beforeCaptureScreenshot callback - Callback to decide if SDK should capture a screenshot
    Status: NOT FOUND in Apple docs (only documented in Flutter docs)

  • [ ] Document beforeCaptureViewHierarchy callback - Callback to decide if SDK should capture a view hierarchy
    Status: NOT FOUND in Apple docs (only documented in Flutter docs)

  • [ ] Document onCrashedLastRun callback - Block called after SDK initialization when last execution terminated with a crash
    Status: NOT FOUND in any docs

  • [ ] Document enableWatchdogTerminationTracking option in main options.mdx - Whether to enable Watchdog Termination tracking (default: true)
    Note: Has dedicated page (watchdog-terminations.mdx) but should be referenced in main options.mdx

  • [ ] Document sessionTrackingIntervalMillis option in main options.mdx - Interval to end a session after app goes to background (default: 30000 ms)
    Note: Has dedicated page but should be referenced in main options.mdx

  • [ ] Expand documentation for enablePersistingTracesWhenCrashing option - Experimental: Links ongoing transactions to crash events (default: false)
    Note: Already mentioned but needs full documentation

UIKit-Specific Options

  • [ ] Document enableReportNonFullyBlockingAppHangs option in main options.mdx - When enabled, SDK reports non-fully-blocking app hangs (default: true)
    Note: Mentioned in app-hangs.mdx but not in main options.mdx

Screenshot Options (options.screenshot)

  • [ ] Verify PR #15658 is merged and screenshot options documentation is complete
  • [ ] Add screenshot options to main options.mdx with link to detailed screenshot documentation page
    Options to document: maskAllText, maskAllImages, maskedViewClasses, unmaskedViewClasses, enableViewRendererV2, enableFastViewRendering

Session Replay Options (options.sessionReplay)

  • [ ] Document sessionReplay.enableFastViewRendering option - Enables faster but incomplete view rendering (default: false)
    Status: NOT FOUND in any docs
    Note: enableViewRendererV2 is documented in session-replay/performance-overhead.mdx

Profiling Options (options.configureProfiling)

  • [ ] Document profiling.profileAppStarts option - Start profiler as early as possible during app lifecycle (default: false)
    Status: NOT FOUND in any docs

Network & Performance Options

  • [ ] Document isTracingEnabled read-only property - Indicates if tracing is enabled (read-only)
    Status: NOT FOUND in any docs

  • [ ] Document urlSessionDelegate option - Set as delegate on URLSession used for network tasks
    Status: NOT FOUND in any docs

  • [ ] Document urlSession option - Use custom URLSession with your configuration for sending requests
    Status: NOT FOUND in any docs

Other Options

  • [ ] Document cacheDirectoryPath option - Path to store SDK data (events, transactions, profiles, etc.) (default: NSCachesDirectory)
    Status: NOT FOUND in Apple docs (only documented in Android docs)

  • [ ] Document enableSpotlight option - Whether to enable Spotlight for local development (default: false)
    Status: NOT FOUND in Apple docs (only mentioned in React Native migration docs)

  • [ ] Document spotlightUrl option - The Spotlight URL (default: "http://localhost:8969/stream")
    Status: NOT FOUND in Apple docs (only mentioned in React Native migration docs)

Documentation Structure Improvements

  • [ ] Add comprehensive reference table in options.mdx linking to feature-specific documentation pages
  • [ ] Ensure all options mentioned in feature-specific pages are also referenced in main options.mdx:
    • enableCrashHandler (mentioned in watchdog-terminations.mdx)
    • enableLogs (mentioned in migration/index.mdx)
    • enableWatchdogTerminationTracking (has dedicated page)
    • sessionTrackingIntervalMillis (has dedicated page)
    • enableReportNonFullyBlockingAppHangs (mentioned in app-hangs.mdx)
  • [ ] Review and consolidate documentation for options that appear in multiple places
  • [ ] Add missing callbacks to hooks section in options.mdx:
    • beforeSendSpan
    • beforeSendLog
    • beforeCaptureScreenshot
    • beforeCaptureViewHierarchy
    • onCrashedLastRun

Summary

Total options checked: 35
Actually missing: 18
Documented elsewhere (needs main options.mdx reference): 7
Verified as documented: 10

philprime avatar Dec 10 '25 08:12 philprime