CardinalityLimiter

com.netflix.atlas.core.limiter.CardinalityLimiter
See theCardinalityLimiter companion object
abstract class CardinalityLimiter(val limiterConfig: LimiterConfig)

A structure that tracks cardinality based on tag keys, and drop or rollup tags based on given configuration.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def cardinalityBy(values: List[String]): Long

Get cardinality for a given list of values of prefix keys.

Get cardinality for a given list of values of prefix keys.

Attributes

def cardinalityBy(values: List[String], tagKey: String): Long

Get cardinality for a given list of values of prefix keys and a specific tag key.

Get cardinality for a given list of values of prefix keys and a specific tag key.

Attributes

def topK(k: Int): CardinalityStats

A convenient way get top k keys by cardinality at all levels, mainly used for debug/inspect.

A convenient way get top k keys by cardinality at all levels, mainly used for debug/inspect.

Value parameters

k

number of top keys

Attributes

Returns

cardinality stats

def update(tags: Map[String, String], id: AnyRef): Map[String, String]

Update cardinality stats for the given tags.

Update cardinality stats for the given tags.

Value parameters

id

id that represents the tags

tags

tags to track

Attributes

Returns
  • null if it should be dropped
  • updated tags if tag roll up happened
  • same object with input tags otherwise

Concrete methods

def canServe(query: Query): Boolean

Check if a query can be served based on the cardinality stats and defined limits.

Check if a query can be served based on the cardinality stats and defined limits.

Attributes

def cardinality: Long

Get total cardinality for distinct tag maps ever seen.

Get total cardinality for distinct tag maps ever seen.

Attributes

def update(tags: Map[String, String]): Map[String, String]

Attributes

Concrete fields