App Startup Instrumentation
Generates: Spans
Measures cold launch duration from SDK initialization to the moment the first screen appears.
How It Works
When Pulse.shared.initialize(...) is called, the SDK records a start timestamp. When the first UIViewController.viewDidAppear fires, the startup span is closed. The resulting span (AppStart) captures exactly how long it took for the user to see the first usable screen.
Configuration
App startup tracking is enabled by default.
Pulse.shared.initialize(
endpointBaseUrl: "https://your-backend.com",
apiKey: "your-api-key",
instrumentations: { config in
config.appStartup { $0.enabled(true) } // default: true
}
)
Generated Telemetry
Type: Span
Span Name: AppStart
Span Kind: Internal
pulse.type: app_startup
Attributes
| Attribute | Description | Example | Always Present |
|---|---|---|---|
pulse.type | Instrumentation type | "app_startup" | ✅ Yes |
screen.name | First screen that appeared | "HomeViewController" | ✅ Yes |
session.id | Session identifier | "f40364c92b85ec0c19c35a65be42b97f" | ✅ Yes |
Sample Payload
{
"name": "AppStart",
"kind": "INTERNAL",
"duration_ms": 843,
"attributes": {
"pulse.type": "app_startup",
"screen.name": "HomeViewController",
"session.id": "f40364c92b85ec0c19c35a65be42b97f"
}
}
Best Practices
- Initialize the SDK as early as possible — in
application(_:didFinishLaunchingWithOptions:)or theAppinit()— to capture the full cold launch duration. - The startup span only fires once per process. Subsequent
viewDidAppearcalls after the first are tracked by Screen Lifecycle instrumentation.
Disabling App Startup
config.appStartup { $0.enabled(false) }