Skip to content
Telemetry

Log telemetry from macOS

Attach structured product events to the signed-in customer.

Enable product telemetry

Include .logs in BTXConfiguration.features, alongside .messenger when the app also uses support or feedback. Configure once and identify the customer before sending customer activity.

01

Log structured events

Product event
import BTXClientKit

func recordExport(format: String, itemCount: Int) {
    BTX.log(
        "export_completed",
        properties: ["format": format, "itemCount": itemCount]
    )
}

BTX.log(...) is safe to call from any thread. The return value indicates whether the event was queued; it does not confirm delivery.

Properties can contain strings, numbers, booleans, arrays, dictionaries, and BTXJSONValue values. Keep event names and property shapes stable. Do not send credentials, full document contents, or other sensitive payloads.

02

Include app context

When logs are enabled, the SDK includes app, operating system, CPU architecture, and SDK version context. Use BTXAppContext to provide an explicit app version, build number, or bounded app attributes.