Analytics
Records usage events to a destination in batches for tracking purposes.
Description
More details on Analytics capabilities can be found in Analytics.
Like other entities, the analytics configuration uses a parameter called name to dictate the type of analytics tracking to use, but the batching configuration below is shared by all options and goes under a batch parameter. Analytics is disabled by default.
Example
-
YAML
-
JSON
analytics:
name: clickhouse
id: warehouse
datastore: ch-0
table: tile_events
fields:
- duration
- bytes
extraFields:
tenant: hdr.X-Tenant-Id
environment: production
batch:
maxSize: 5000
maxAge: 30
{
"analytics": {
"name": "clickhouse",
"id": "warehouse",
"datastore": "ch-0",
"table": "tile_events",
"fields": [
"duration",
"bytes"
],
"extraFields": {
"tenant": "hdr.X-Tenant-Id",
"environment": "production"
},
"batch": {
"maxSize": 5000,
"maxAge": 30
}
}
}
Configuration
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
|
Write a batch once this many events have accumulated |
uint |
No |
1000 |
|
Write a partial batch after this many seconds so low-traffic layers still report promptly |
uint |
No |
10 |
|
The maximum number of events that can be held in memory. Raise this to absorb larger bursts at the cost of memory |
uint |
No |
10000 |
|
How many batches may be written concurrently |
uint |
No |
1 |
|
What to do when the queue is full. Can be |
string |
No |
drop |