Native iOS SDK Configuration Reference
Configuration keys for the native iOS SDK, from endpoints to sampling and privacy.
1. Required configuration
| Key | Type | Default | Description |
|---|---|---|---|
heal_receiver_endpoint |
String | — | OTLP HTTP endpoint for traces |
service_name |
String | — | Service name in traces |
2. Custom variables
| Key | Type | Default | Description |
|---|---|---|---|
custom_variable_keys |
[String] | [] |
Header names to capture |
custom_variables |
[String: String] | [:] |
Constant attributes for spans |
3. Journey tracking
| Key | Type | Default | Description |
|---|---|---|---|
journey_header |
String | nil |
Header for journey name |
journey_path_rules |
[String: String] | [:] |
URL path to journey mapping |
4. Trace context
| Key | Type | Default | Description |
|---|---|---|---|
trace_id_key |
String | gt-id |
Custom header for trace ID |
inject_traceparent |
Bool | true |
Inject W3C traceparent header |
sampling_ratio |
Double | 1.0 |
Sampling ratio (0.0 – 1.0) |
Production configuration template
Sampling is deployment-specific
The value shown below is illustrative, not a production recommendation. Replace sampling_ratio with the ratio approved for the deployment after validating telemetry volume, cost, and diagnostic coverage.
let productionConfig: [String: Any] = [
"heal_receiver_endpoint": "https://your-production-endpoint.com/v1/traces",
"service_name": "YourApp-ios",
"environment": "prod",
"custom_variable_keys": ["journeyName", "appVersion", "environment"],
"journey_header": "journeyName",
"inject_traceparent": true,
"sampling_ratio": 1.0,
"ignore_urls": ["/v1/traces"],
"debug_log_injection": false
]
Recommended development config
let devConfig: [String: Any] = [
"heal_receiver_endpoint": "https://dev-telemetry.example.com/v1/traces",
"service_name": "YourApp-ios-dev",
"environment": "dev",
"custom_variable_keys": ["journeyName", "appVersion", "environment"],
"journey_header": "journeyName",
"inject_traceparent": true,
"sampling_ratio": 1.0,
"debug_log_injection": false // Enable for debugging
]
Configured SDK Behavior#
Once initialized, the SDK performs only the interception and attribute collection enabled by the approved configuration.
1. HTTP request interception
| Feature | Description |
|---|---|
| URLProtocol Installation | Intercepts all URLSession requests |
| Span Creation | Creates client spans for each HTTP request |
| Timing Metrics | Records request/response timing |
2. Approved device and application attributes
| Attribute | Example Value |
|---|---|
app.bundle |
com.yourcompany.app |
app.version |
1.2.3 |
device.model |
iPhone14,2 |
os.name / os.version |
iOS / 17.2 |
IP address and precise location are not automatic defaults. Keep location disabled unless a documented purpose and the required notice, consent, retention, and access controls are in place.
3. Journey name derivation
The journey name is determined in this order:
- Header value (if
journey_headeris configured) - Path rules (if the URL matches
journey_path_rules) - None (if no match)
Example path rules:
"journey_path_rules": [
"/login/": "Login",
"/upi/": "UPI Payment",
"/transfer/": "Bank Transfer",
"/balance/": "Balance Inquiry",
"/profile/": "Profile View"
]