Function metrics_controller::foreign_metrics::init_metrics [] [src]

pub extern fn init_metrics(app_name: *const c_char, app_version: *const c_char, app_update_channel: *const c_char, app_build_id: *const c_char, app_platform: *const c_char, locale: *const c_char, device: *const c_char, arch: *const c_char, os: *const c_char, os_version: *const c_char)

Initializes the Metrics Libary. Caller passes information about their application and environment. This information will be associated with the metrics data recorded by the record_event function.

Note that it is mandatory to call init_metrics before calling record_event

Examples

init_metrics("myapp",
        "1.0",
        "default",
        "20160303",
        "c",
        "en-us",
        "pi",
        "LAMP",
        "linux",
        "redhat 1.0");