pub struct InitOptions {
pub host: Option<String>,
pub flush_interval: Option<Duration>,
pub api_path: Option<String>,
pub app_key_header: Option<String>,
pub sdk_name: Option<String>,
}Expand description
Options for customizing the analytics backend the plugin talks to.
The plugin is backend-agnostic: there is no implicit host resolution. Set
host (and optionally api_path, app_key_header and sdk_name) to point
the plugin at your analytics backend. When host is unset, tracking is
disabled.
Fields§
§host: Option<String>Base URL of the analytics backend (e.g. https://analytics.myapp.com).
Required to enable tracking. The plugin sends events to
{host}{api_path}.
flush_interval: Option<Duration>How often to flush queued events to the backend. Defaults to 60s in release builds and 2s in debug builds.
api_path: Option<String>Path appended to host to form the ingest URL. Defaults to
/v1/events.
app_key_header: Option<String>Name of the HTTP header that carries the App Key. Defaults to
App-Key.
sdk_name: Option<String>Value reported in systemProps.sdkVersion on each event. Defaults to
<crate-name>@<crate-version>.