Configuration
| Option | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
apiKey | String | Yes | none | non-blank | Your B2Metric API key |
appIdentifier | String | Yes | none | snake_case | Registered app identifier, sent as user_properties.app_identifier |
baseUrl | String | No | https://tracker.b2metric.com | non-blank | Endpoint base; override only for test/staging |
batchSize | Int | No | 20 | 1–100 | Events per batch, and per delivery request |
flushIntervalSeconds | Long | No | 30 | 1–3600 | Seconds between periodic flushes |
maxRetries | Int | No | 3 | 1–10 | Failed passes after which a retry warning is logged |
sessionTimeoutMinutes | Int | No | 30 | 1–10080 | Inactivity window before a new session |
maxQueueSize | Int | No | 1000 | 100–10000 | Undelivered events kept on device; oldest evicted first |
b2MetricAnalyticsLogLevel | LogLevel | No | OFF | see below | SDK log verbosity |
maxRetries is diagnostic only: events are never dropped for retry exhaustion. An event leaves the queue when it is delivered, rejected by the API with a 4xx, or evicted by maxQueueSize.
Note
The config's toString() masks the API key (only a short prefix survives), so logging a config instance never leaks the credential.