stats

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStatsFilterFactory

func CreateStatsFilterFactory(conf map[string]interface{}) (api.StreamFilterChainFactory, error)

CreateStatsFilterFactory for create stats filter factory

Types

type FilterConfigFactory

type FilterConfigFactory struct {
	// contains filtered or unexported fields
}

FilterConfigFactory filter config factory

func (*FilterConfigFactory) CreateFilterChain

func (f *FilterConfigFactory) CreateFilterChain(context context.Context, callbacks api.StreamFilterChainFactoryCallbacks)

CreateFilterChain for create stats filter

type MetricConfig

type MetricConfig struct {
	// Metric name to restrict the override to a metric. If not specified, applies to all.
	Name string `json:"name,omitempty"`
	// Collection of tag names and tag expressions to include in the metric.
	// Conflicts are resolved by the tag name by overriding previously supplied values.
	Dimensions map[string]string `json:"dimensions,omitempty"`
	// A list of tags to remove.
	TagsToRemove []string `json:"tags_to_remove,omitempty"`
	// Conditional enabling the override.
	Match string `json:"match,omitempty"`
}

type MetricDefinition

type MetricDefinition struct {
	// Metric name
	Name string `json:"name,omitempty"`
	// Metric value expression.
	Value string `json:"value,omitempty"`
	// Metric type.
	Type MetricType `json:"type,omitempty"`
}

type MetricType

type MetricType string
const (
	MetricTypeCounter   MetricType = "COUNTER"
	MetricTypeGauge     MetricType = "GAUGE"
	MetricTypeHistogram MetricType = "HISTOGRAM"
)

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func (*Metrics) Stat

func (m *Metrics) Stat(bag attribute.Bag) ([]*Stat, error)

type Stat

type Stat struct {
	MetricType MetricType
	Name       string
	Labels     map[string]string
	Value      int64
}

type StatsConfig

type StatsConfig struct {
	// The following settings should be rarely used. Enable debug for this filter.
	Debug string `json:"debug"`
	// maximum size of the peer metadata cache. A long lived proxy that connects with many transient peers can build up a large cache. To turn off the cache, set this field to a negative value.
	MaxPeerCacheSize int `json:"max_peer_cache_size"`
	// prefix to add to stats emitted by the plugin.
	StatPrefix string `json:"stat_prefix"`
	// Stats api squashes dimensions in a single string. The squashed string is parsed at prometheus scrape time to recover dimensions.
	// The following 2 fields set the field and value separators {key: value} –> key{valueseparator}value{fieldseparator}
	FieldSeparator string `json:"field_separator"`
	// default: “==”
	ValueSeparator string `json:"value_separator"`
	// Disable using host header as a fallback if destination service is not available from the controlplane. Disable the fallback if the host header originates outsides the mesh, like at ingress.
	DisableHostHeaderFallback bool `json:"disable_host_header_fallback,omitempty"`
	// Allows configuration of the time between calls out to for TCP metrics reporting. The default duration is 15s.
	TcpReportingDuration time.Duration `json:"tcp_reporting_duration,omitempty"`
	// Metric overrides.
	Metrics []*MetricConfig `json:"metrics"`
	// Metric definitions.
	Definitions []*MetricDefinition `json:"definitions"`
}

https://istio.io/latest/docs/reference/config/proxy_extensions/stats/#MetricDefinition

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL