macOS Application Integration¶
Guance APM enables the collection of metric data from various macOS applications, providing visual analysis of performance across macOS application clients.
Reading Path¶
- First-time Integration: Start with Quick Start
- Complete Integration: Continue reading this document
- Initialization Parameters: Refer to SDK Initialization, RUM Configuration, Log Configuration, Trace Configuration
- Custom Capabilities: Refer to Custom Tag Usage, Data Collection Custom Rules
- Data Model: Refer to Application Data Collection
- Troubleshooting: Refer to Troubleshooting
Prerequisites¶
Note
If the RUM Headless service has been activated, the prerequisites are automatically configured, and you can proceed directly with application integration.
- Install DataKit;
- Configure the RUM Collector
Application Integration¶
- Navigate to RUM > Create > macOS;
- Enter the application name;
- Enter the application ID;
-
Select the application integration method:
- Public DataWay: Directly receives RUM data without installing the DataKit collector.
- Local Environment Deployment: Receives RUM data after meeting the prerequisites.
Installation¶
Source Code Repository: https://github.com/GuanceCloud/datakit-macos
Demo: https://github.com/GuanceCloud/datakit-macos/Example
- Configure the
Podfilefile.
- Execute
pod installin the directory containing thePodfileto install the SDK.
-
Select
PROJECT->Package Dependency, then click the + under thePackagessection. -
In the pop-up page, enter
https://github.com/GuanceCloud/datakit-macosin the search box. This is the repository location. -
After Xcode successfully fetches the package, it will display the SDK configuration page.
Dependency Rule: It is recommended to select Up to Next Major Version.
Add To Project: Select the supported project.
After filling in the configuration, click the Add Package button and wait for the loading to complete.
- In the pop-up window
Choose Package Products for datakit-macos, select the Target to which you want to add the SDK, then click theAdd Packagebutton. The SDK is now successfully added.
If your project is managed by SPM, add FTMacOSSDK as a dependency by adding dependencies to Package.swift.
```swift dependencies: [
.package(url: "https://github.com/GuanceCloud/datakit-macos.git", .upToNextMajor(from: "[latest_version]")) ] ```
Adding Header Files¶
Detailed Configuration Entries¶
Advanced Scenarios¶
Frequently Asked Questions¶
About Crash Log Analysis¶
For crash log analysis and dSYM instructions, please refer to Troubleshooting.
Encountering "Include of non-modular header inside framework module" Error¶
Because the SDK's .h file includes header files from dependencies, you need to set:
Target -> Build Settings -> CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES.