-
Notifications
You must be signed in to change notification settings - Fork 58
Redis stats format
strk edited this page Jun 4, 2013
·
5 revisions
Everytime a multilayer token is requested the tiler increments mapviews
counters.
Each mutilayer config may contain a stat_tag
configuration that's used to determine which counter to increment in addition to the global one.
User metadata redis database is used for this (number 5). The redis key of the records is as follows:
user:<username>:mapviews:global
user:<username>:mapviews:stat_tag:<tag>
Each key is a sorted set (http://redis.io/topics/data-types). Value of each element of the set will be a date identifier, in the format "YYYYMMDD". Score of each element will be the number of hits.
Both global and tag-specific counters will be increased when a stat_tag
is provided.
Otherwise, only the global counter will be increased.
Examples:
- mapview request attached to visualization with tag 12345:
zincrby user:luisico:mapviews:global 1 "20130604"
zincrby user:luisico:mapviews:stat_tag:12345 1 "20130604"
- mapview request without visualization id:
zincrby user:luisico:mapviews:global 1 "20130604"