Documentation ¶
Index ¶
- Variables
- type Config
- type Kind
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetDesc() string
- func (x *Metric) GetFields() []string
- func (x *Metric) GetKind() Kind
- func (x *Metric) GetMetric() string
- func (x *Metric) GetRules() []*Rule
- func (x *Metric) GetUnits() Unit
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type Rule
- type Unit
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Kind_name = map[int32]string{ 0: "KIND_UNSPECIFIED", 1: "GAUGE", 2: "COUNTER", 3: "CUMULATIVE_DISTRIBUTION", } Kind_value = map[string]int32{ "KIND_UNSPECIFIED": 0, "GAUGE": 1, "COUNTER": 2, "CUMULATIVE_DISTRIBUTION": 3, } )
Enum value maps for Kind.
View Source
var ( Unit_name = map[int32]string{ 0: "UNIT_UNSPECIFIED", 1: "MILLISECONDS", 2: "BYTES", } Unit_value = map[string]int32{ "UNIT_UNSPECIFIED": 0, "MILLISECONDS": 1, "BYTES": 2, } )
Enum value maps for Unit.
View Source
var File_go_chromium_org_luci_server_cmd_statsd_to_tsmon_config_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // A collection of tsmon metrics and rules for how to extract them from statsd // metrics. Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetMetrics ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Kind ¶
type Kind int32
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
func (Kind) Type ¶
func (Kind) Type() protoreflect.EnumType
type Metric ¶
type Metric struct { // Name of the tsmon metric to produce, required. Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` // A kind of the metric, required. Kind Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=statsd_to_tsmon.config.Kind" json:"kind,omitempty"` // Metric description. Optional, but recommended. Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` // Units of the metric value. Optional, but recommended. Units Unit `protobuf:"varint,4,opt,name=units,proto3,enum=statsd_to_tsmon.config.Unit" json:"units,omitempty"` // A set of fields of this metric. Fields []string `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` // A list of rules that map statds metrics to fields of this metric. // // Each rule is represented by a statsd metric name pattern (that looks like // e.g. "something.*.${var}.*.sfx") and a recipe of how to get tsmon field // name of metrics matching the pattern. // // In the current implementation the last component of each pattern must be // some static string (i.e. not `*` and not a var) and all such suffixes must // be unique across the entire configuration file. Rules []*Rule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
func (*Metric) Descriptor
deprecated
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type Rule ¶
type Rule struct { // A pattern to match statsd metric name against. // // Also used to "extract" interesting portions of the metric name to use them // in `fields`. // // For example, if the pattern is "something.*.${var}.*.sfx", statds metric // "something.foo.val.bar.sfx" matches it, and `var` value is set to "val". Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` // A map "field name => its value". // // The set of field names should be equal to the set of fields specified // in the metric definition. // // Each field value is either a static string ("foo"), or a reference to // some variable ("${var}") parsed from the statsd metric name according to // the pattern. Fields map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetPattern ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type Unit ¶
type Unit int32
func (Unit) Descriptor ¶
func (Unit) Descriptor() protoreflect.EnumDescriptor
func (Unit) EnumDescriptor
deprecated
func (Unit) Number ¶
func (x Unit) Number() protoreflect.EnumNumber
func (Unit) Type ¶
func (Unit) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.