Swizzling
Learn which features use swizzling
The Cocoa SDK uses swizzling to provide some features out of the box without boilerplate code. The following features use swizzling:
macOS
- Breadcrumbs for touch events
- Auto instrumentation for HTTP requests
- Auto instrumentation for File I/O operations
- Auto instrumentation for Core Data operations
- Automatically added sentry-trace header to HTTP requests for distributed tracing
- HTTP Client Errors
iOS, tvOS and Catalyst
- Breadcrumbs for touch events and navigation with UIViewControllers
- Auto instrumentation for UIViewControllers
- Auto instrumentation for HTTP requests
- Auto instrumentation for File I/O operations
- Auto instrumentation for Core Data operations
- Automatically added sentry-trace header to HTTP requests for distributed tracing
- User interaction transactions for UI clicks
- HTTP Client Errors
Since Cocoa 7.5.0, you can opt out of swizzling using options. When you disable swizzling, the SDK disables the features above:
Copied
import Sentry
SentrySDK.start { options in
options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
options.enableSwizzling = false
}
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").