Overview
Console.log debugging doesn't scale. For Swift production apps, you need structured, searchable, correlated log management.
Bugsly provides a first-class Swift integration for log management that takes minutes to set up and immediately starts delivering value.
Installation and Setup
Start by adding Bugsly to your project:
pod 'Bugsly'Next, initialize the SDK in your application:
import Bugsly
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
BugslySDK.start { options in
options.dsn = "YOUR_BUGSLY_DSN"
options.tracesSampleRate = 1.0
}
return true
}How It Works
Once initialized, the Bugsly Swift SDK automatically instruments your application. Here's what happens behind the scenes:
- Automatic error capture: Unhandled exceptions and promise rejections are caught and reported with full stack traces
- Context enrichment: Each event includes environment data, request details, and user context where available
- Intelligent grouping: Similar errors are grouped together so you see issues, not individual events
- Performance data: Transaction traces help you understand the performance impact of errors
Customizing Your Integration
For Swift projects, we recommend enabling these additional features after the basic setup:
- Source maps (if applicable) — upload source maps during your build so Bugsly can display readable stack traces
- User feedback — prompt users who encounter errors for additional context
- Custom tags — add business-specific metadata to events for filtering and analysis
Bugsly's dashboard will become your team's go-to tool for understanding what's happening in your Swift production environment.
Next Steps
After configuring log management, set up log-based alerts for critical patterns like authentication failures or payment errors. Use Bugsly's log correlation to connect log entries with error events and traces. Create saved searches for common debugging scenarios your team encounters regularly.
Try Bugsly Free
AI-powered error tracking that explains your bugs. Set up in 2 minutes, free forever for small projects.
Get Started FreeRelated Articles
How to Set Up Distributed Tracing in Svelte
Step-by-step tutorial for configuring Bugsly distributed tracing in Svelte. Includes code snippets and optimization tips.
Read moreAngular Error Tracking: Complete Setup Guide
Set up error tracking for Angular using Bugsly. Quick installation, configuration, and verification steps included.
Read moreCI/CD Monitoring for Vue.js: A Setup Guide
Set up ci/cd monitoring for Vue.js using Bugsly. Quick installation, configuration, and verification steps included.
Read moreNode.js Error Tracking: Complete Setup Guide
Add error tracking to your Node.js app with Bugsly. Covers installation, SDK setup, and production best practices.
Read more