Skip to main content

MetricFilterinterface

Metric filters that can be specified as part of a specific metric.

Properties (9)

Property Type Default Required Description
additionalAttributes⚓︎ { [x: string]: unknown } | (() => { [x: string]: unknown }) x x

Additional attributes to publish with the values of the metric, specified as key/value pairs or as a callback returning them (called for every value). Can be specified for a single metric (publishingSettings), for all metrics (defaultPublishingSettings) and in a metric filter; the levels add up, the most specific one winning on an attribute. They are added when a value is published - after a filter has been matched - and go through the attributeSettings like the rest; the additionalAttributes of a MetricSettings are part of the value itself instead.

attributes⚓︎ { complexLoad?: boolean; includesFrameCreation?: boolean; } & Record<string, any> x x

Matches the attributes attached to a metric value. Not all metrics have all attribute values.

attributeSettings⚓︎ { [x: string]: MetricAttributeSettings; } x x

Controls the publishing of specific attributes, by name. An entry names an attribute by its flattened (dot-separated) name, or everything nested under it - "bounds" covers "bounds.left" - and the most specific entry is the one that applies to an attribute. See MetricAttributeSettings for what an entry does, and attributeSettingsMode for whether the entries are a block list (the default) or an allow list. Every distinct combination of attribute values is a time series of its own, so this is the way to keep a metric to the dimensions that are actually needed.

Can be specified for a single metric (publishingSettings), for all metrics (defaultPublishingSettings) and in a metric filter. The levels add up by attribute name, the most specific one - a matching filter, then the metric, then the defaults - having the last word on an attribute. Applies to the attributes of the metric values; the resource attributes only get the defaultPublishingSettings, and without the allow list.

attributeSettingsMode⚓︎ AttributeSettingsMode x x

How the attributeSettings read: "blocklist" (the default) publishes everything except the attributes with a "drop" entry - an "allow" entry is the exception to a broader "drop" ("bounds" dropped, "bounds.width" allowed); "allowlist" publishes only the attributes with an "allow" or a "mask" entry. The most specific level that sets it applies - a matching filter's, then the metric's, then the defaults'.

enabled⚓︎ boolean x x

Whether or not the value for the matching metric will be published.

name⚓︎ string x x

The name of the matched metric.

overrideDefaultFilters⚓︎ boolean false x

If true, this filter rule will be matched before any default filters provided by io.Connect. The default filters are usually meant filter out non-representative operations (e.g. partial workspace loads), but you can use this property to force them to be measured. If false, default filters will be matched before this filtering rule.

sample⚓︎ number | boolean true x

Defines sampling probability for the metric.

type⚓︎ MetricType x x

The type of the matched metric.