package model

Import Path
	github.com/prometheus/common/model (on go.dev)

Dependency Relation
	imports 14 packages, and imported by 5 packages

Involved Source Files alert.go fingerprinting.go fnv.go labels.go labelset.go labelset_string.go metadata.go metric.go Package model contains common data structures that are shared across Prometheus components and libraries. signature.go silence.go time.go value.go value_float.go value_histogram.go value_type.go
Package-Level Type Names (total 38)
/* sort by: | */
Alert is a generic representation of an alert in the Prometheus eco-system. Extra key/value information which does not define alert identity. EndsAt time.Time GeneratorURL string Label value pairs for purpose of aggregation, matching, and disposition dispatching. This must minimally include an "alertname" label. The known time range for this alert. Both ends are optional. Fingerprint returns a unique hash for the alert. It is equivalent to the fingerprint of the alert's label set. Name returns the name of the alert. It is equivalent to the "alertname" label. Resolved returns true iff the activity interval ended in the past. ResolvedAt returns true iff the activity interval ended before the given timestamp. Status returns the status of the alert. StatusAt returns the status of the alert at the given timestamp. (*Alert) String() string Validate checks whether the alert data is inconsistent. *Alert : github.com/polarsignals/frostdb/query/logicalplan.Named *Alert : expvar.Var *Alert : fmt.Stringer
Alert is a list of alerts that can be sorted in chronological order. HasFiring returns true iff one of the alerts is not resolved. HasFiringAt returns true iff one of the alerts is not resolved at the time ts. ( Alerts) Len() int ( Alerts) Less(i, j int) bool Status returns StatusFiring iff at least one of the alerts is firing. StatusAt returns StatusFiring iff at least one of the alerts is firing at the time ts. ( Alerts) Swap(i, j int) Alerts : sort.Interface
func (*Alert).Status() AlertStatus func (*Alert).StatusAt(ts time.Time) AlertStatus func Alerts.Status() AlertStatus func Alerts.StatusAt(ts time.Time) AlertStatus const AlertFiring const AlertResolved
Duration wraps time.Duration. It is used to parse the custom duration format from YAML. This type should not propagate beyond the scope of input/output processing. MarshalJSON implements the json.Marshaler interface. MarshalText implements the encoding.TextMarshaler interface. MarshalYAML implements the yaml.Marshaler interface. Set implements pflag/flag.Value ( Duration) String() string Type implements pflag.Value UnmarshalJSON implements the json.Unmarshaler interface. UnmarshalText implements the encoding.TextUnmarshaler interface. UnmarshalYAML implements the yaml.Unmarshaler interface. Duration : github.com/goccy/go-json.Marshaler *Duration : github.com/goccy/go-json.Unmarshaler *Duration : github.com/spf13/pflag.Value *Duration : encoding.TextMarshaler *Duration : encoding.TextUnmarshaler Duration : encoding/json.Marshaler *Duration : encoding/json.Unmarshaler Duration : expvar.Var *Duration : flag.Value Duration : fmt.Stringer Duration : gopkg.in/yaml.v3.Marshaler func ParseDuration(s string) (Duration, error)
( EscapingScheme) String() string EscapingScheme : expvar.Var EscapingScheme : fmt.Stringer func ToEscapingScheme(s string) (EscapingScheme, error) func github.com/prometheus/common/expfmt.Format.ToEscapingScheme() EscapingScheme func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricFamily func EscapeName(name string, scheme EscapingScheme) string func UnescapeName(name string, scheme EscapingScheme) string func github.com/prometheus/common/expfmt.Format.WithEscapingScheme(s EscapingScheme) expfmt.Format const DotsEscaping var NameEscapingScheme const NoEscaping const UnderscoreEscaping const ValueEncodingEscaping
Fingerprint provides a hash-capable representation of a Metric. For our purposes, FNV-1A 64-bit is used. ( Fingerprint) String() string Fingerprint : expvar.Var Fingerprint : fmt.Stringer func FingerprintFromString(s string) (Fingerprint, error) func ParseFingerprint(s string) (Fingerprint, error) func (*Alert).Fingerprint() Fingerprint func LabelSet.FastFingerprint() Fingerprint func LabelSet.Fingerprint() Fingerprint func Metric.FastFingerprint() Fingerprint func Metric.Fingerprint() Fingerprint
Fingerprints represents a collection of Fingerprint subject to a given natural sorting scheme. It implements sort.Interface. Len implements sort.Interface. Less implements sort.Interface. Swap implements sort.Interface. Fingerprints : sort.Interface
FingerprintSet is a set of Fingerprints. Equal returns true if both sets contain the same elements (and not more). Intersection returns the elements contained in both sets. func FingerprintSet.Intersection(o FingerprintSet) FingerprintSet func FingerprintSet.Equal(o FingerprintSet) bool func FingerprintSet.Intersection(o FingerprintSet) FingerprintSet
( FloatString) MarshalJSON() ([]byte, error) ( FloatString) String() string (*FloatString) UnmarshalJSON(b []byte) error FloatString : github.com/goccy/go-json.Marshaler *FloatString : github.com/goccy/go-json.Unmarshaler FloatString : encoding/json.Marshaler *FloatString : encoding/json.Unmarshaler FloatString : expvar.Var FloatString : fmt.Stringer
Boundaries int32 Count FloatString Lower FloatString Upper FloatString (*HistogramBucket) Equal(o *HistogramBucket) bool ( HistogramBucket) MarshalJSON() ([]byte, error) ( HistogramBucket) String() string (*HistogramBucket) UnmarshalJSON(buf []byte) error HistogramBucket : github.com/goccy/go-json.Marshaler *HistogramBucket : github.com/goccy/go-json.Unmarshaler HistogramBucket : encoding/json.Marshaler *HistogramBucket : encoding/json.Unmarshaler HistogramBucket : expvar.Var HistogramBucket : fmt.Stringer func (*HistogramBucket).Equal(o *HistogramBucket) bool
( HistogramBuckets) Equal(o HistogramBuckets) bool func HistogramBuckets.Equal(o HistogramBuckets) bool
Interval describes an interval between two timestamps. End Time Start Time
A LabelName is a key for a LabelSet or Metric. It has a value associated therewith. IsValid returns true iff the name matches the pattern of LabelNameRE when NameValidationScheme is set to LegacyValidation, or valid UTF-8 if NameValidationScheme is set to UTF8Validation. IsValidLegacy returns true iff name matches the pattern of LabelNameRE for legacy names. It does not use LabelNameRE for the check but a much faster hardcoded implementation. UnmarshalJSON implements the json.Unmarshaler interface. UnmarshalYAML implements the yaml.Unmarshaler interface. *LabelName : github.com/goccy/go-json.Unmarshaler LabelName : database/sql/driver.Validator *LabelName : encoding/json.Unmarshaler func SignatureForLabels(m Metric, labels ...LabelName) uint64 func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64
LabelNames is a sortable LabelName slice. In implements sort.Interface. ( LabelNames) Len() int ( LabelNames) Less(i, j int) bool ( LabelNames) String() string ( LabelNames) Swap(i, j int) LabelNames : expvar.Var LabelNames : fmt.Stringer LabelNames : sort.Interface
LabelPair pairs a name with a value. Name LabelName Value LabelValue
LabelPairs is a sortable slice of LabelPair pointers. It implements sort.Interface. ( LabelPairs) Len() int ( LabelPairs) Less(i, j int) bool ( LabelPairs) Swap(i, j int) LabelPairs : sort.Interface
A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet may be fully-qualified down to the point where it may resolve to a single Metric in the data store or not. All operations that occur within the realm of a LabelSet can emit a vector of Metric entities to which the LabelSet may match. Before compares the metrics, using the following criteria: If m has fewer labels than o, it is before o. If it has more, it is not. If the number of labels is the same, the superset of all label names is sorted alphanumerically. The first differing label pair found in that order determines the outcome: If the label does not exist at all in m, then m is before o, and vice versa. Otherwise the label value is compared alphanumerically. If m and o are equal, the method returns false. Clone returns a copy of the label set. Equal returns true iff both label sets have exactly the same key/value pairs. FastFingerprint returns the LabelSet's Fingerprint calculated by a faster hashing algorithm, which is, however, more susceptible to hash collisions. Fingerprint returns the LabelSet's fingerprint. Merge is a helper function to non-destructively merge two label sets. String will look like `{foo="bar", more="less"}`. Names are sorted alphabetically. UnmarshalJSON implements the json.Unmarshaler interface. Validate checks whether all names and values in the label set are valid. *LabelSet : github.com/goccy/go-json.Unmarshaler *LabelSet : encoding/json.Unmarshaler LabelSet : expvar.Var LabelSet : fmt.Stringer func LabelSet.Clone() LabelSet func LabelSet.Merge(other LabelSet) LabelSet func LabelSet.Before(o LabelSet) bool func LabelSet.Equal(o LabelSet) bool func LabelSet.Merge(other LabelSet) LabelSet
A LabelValue is an associated value for a LabelName. IsValid returns true iff the string is a valid UTF-8. LabelValue : database/sql/driver.Validator func IsValidMetricName(n LabelValue) bool
LabelValues is a sortable LabelValue slice. It implements sort.Interface. ( LabelValues) Len() int ( LabelValues) Less(i, j int) bool ( LabelValues) Swap(i, j int) LabelValues : sort.Interface
Matcher describes a matches the value of a given label. IsRegex bool Name LabelName Value string (*Matcher) UnmarshalJSON(b []byte) error Validate returns true iff all fields of the matcher have valid values. *Matcher : github.com/goccy/go-json.Unmarshaler *Matcher : encoding/json.Unmarshaler
Matrix is a list of time series. ( Matrix) Len() int ( Matrix) Less(i, j int) bool ( Matrix) String() string ( Matrix) Swap(i, j int) ( Matrix) Type() ValueType Matrix : Value Matrix : expvar.Var Matrix : fmt.Stringer Matrix : sort.Interface
A Metric is similar to a LabelSet, but the key difference is that a Metric is a singleton and refers to one and only one stream of samples. Before compares the metrics' underlying label sets. Clone returns a copy of the Metric. Equal compares the metrics. FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing algorithm, which is, however, more susceptible to hash collisions. Fingerprint returns a Metric's Fingerprint. ( Metric) String() string Metric : expvar.Var Metric : fmt.Stringer func Metric.Clone() Metric func SignatureForLabels(m Metric, labels ...LabelName) uint64 func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 func Metric.Before(o Metric) bool func Metric.Equal(o Metric) bool
MetricType represents metric type values. const MetricTypeCounter const MetricTypeGauge const MetricTypeGaugeHistogram const MetricTypeHistogram const MetricTypeInfo const MetricTypeStateset const MetricTypeSummary const MetricTypeUnknown
Sample is a sample pair associated with a metric. A single sample must either define Value or Histogram but not both. Histogram == nil implies the Value field is used, otherwise it should be ignored. Histogram *SampleHistogram Metric Metric Timestamp Time Value SampleValue Equal compares first the metrics, then the timestamp, then the value. The semantics of value equality is defined by SampleValue.Equal. MarshalJSON implements json.Marshaler. ( Sample) String() string UnmarshalJSON implements json.Unmarshaler. Sample : github.com/goccy/go-json.Marshaler *Sample : github.com/goccy/go-json.Unmarshaler Sample : encoding/json.Marshaler *Sample : encoding/json.Unmarshaler Sample : expvar.Var Sample : fmt.Stringer func (*Sample).Equal(o *Sample) bool var ZeroSample
Buckets HistogramBuckets Count FloatString Sum FloatString (*SampleHistogram) Equal(o *SampleHistogram) bool ( SampleHistogram) String() string SampleHistogram : expvar.Var SampleHistogram : fmt.Stringer func (*SampleHistogram).Equal(o *SampleHistogram) bool
Histogram should never be nil, it's only stored as pointer for efficiency. Timestamp Time (*SampleHistogramPair) Equal(o *SampleHistogramPair) bool ( SampleHistogramPair) MarshalJSON() ([]byte, error) ( SampleHistogramPair) String() string (*SampleHistogramPair) UnmarshalJSON(buf []byte) error SampleHistogramPair : github.com/goccy/go-json.Marshaler *SampleHistogramPair : github.com/goccy/go-json.Unmarshaler SampleHistogramPair : encoding/json.Marshaler *SampleHistogramPair : encoding/json.Unmarshaler SampleHistogramPair : expvar.Var SampleHistogramPair : fmt.Stringer func (*SampleHistogramPair).Equal(o *SampleHistogramPair) bool
SamplePair pairs a SampleValue with a Timestamp. Timestamp Time Value SampleValue Equal returns true if this SamplePair and o have equal Values and equal Timestamps. The semantics of Value equality is defined by SampleValue.Equal. ( SamplePair) MarshalJSON() ([]byte, error) ( SamplePair) String() string UnmarshalJSON implements json.Unmarshaler. SamplePair : github.com/goccy/go-json.Marshaler *SamplePair : github.com/goccy/go-json.Unmarshaler SamplePair : encoding/json.Marshaler *SamplePair : encoding/json.Unmarshaler SamplePair : expvar.Var SamplePair : fmt.Stringer func (*SamplePair).Equal(o *SamplePair) bool var ZeroSamplePair
Samples is a sortable Sample slice. It implements sort.Interface. Equal compares two sets of samples and returns true if they are equal. ( Samples) Len() int Less compares first the metrics, then the timestamp. ( Samples) Swap(i, j int) Samples : sort.Interface func Samples.Equal(o Samples) bool
SampleStream is a stream of Values belonging to an attached COWMetric. Histograms []SampleHistogramPair Metric Metric Values []SamplePair ( SampleStream) MarshalJSON() ([]byte, error) ( SampleStream) String() string (*SampleStream) UnmarshalJSON(b []byte) error SampleStream : github.com/goccy/go-json.Marshaler *SampleStream : github.com/goccy/go-json.Unmarshaler SampleStream : encoding/json.Marshaler *SampleStream : encoding/json.Unmarshaler SampleStream : expvar.Var SampleStream : fmt.Stringer
A SampleValue is a representation of a value for a given sample at a given time. Equal returns true if the value of v and o is equal or if both are NaN. Note that v==o is false if both are NaN. If you want the conventional float behavior, use == to compare two SampleValues. MarshalJSON implements json.Marshaler. ( SampleValue) String() string UnmarshalJSON implements json.Unmarshaler. SampleValue : github.com/goccy/go-json.Marshaler *SampleValue : github.com/goccy/go-json.Unmarshaler SampleValue : encoding/json.Marshaler *SampleValue : encoding/json.Unmarshaler SampleValue : expvar.Var SampleValue : fmt.Stringer func SampleValue.Equal(o SampleValue) bool
Scalar is a scalar value evaluated at the set timestamp. Timestamp Time Value SampleValue MarshalJSON implements json.Marshaler. ( Scalar) String() string (*Scalar) Type() ValueType UnmarshalJSON implements json.Unmarshaler. *Scalar : Value Scalar : github.com/goccy/go-json.Marshaler *Scalar : github.com/goccy/go-json.Unmarshaler Scalar : encoding/json.Marshaler *Scalar : encoding/json.Unmarshaler Scalar : expvar.Var Scalar : fmt.Stringer
Silence defines the representation of a silence definition in the Prometheus eco-system. Comment string CreatedAt time.Time CreatedBy string EndsAt time.Time ID uint64 Matchers []*Matcher StartsAt time.Time Validate returns true iff all fields of the silence have valid values.
String is a string value evaluated at the set timestamp. Timestamp Time Value string MarshalJSON implements json.Marshaler. (*String) String() string (*String) Type() ValueType UnmarshalJSON implements json.Unmarshaler. *String : Value String : github.com/goccy/go-json.Marshaler *String : github.com/goccy/go-json.Unmarshaler String : encoding/json.Marshaler *String : encoding/json.Unmarshaler *String : expvar.Var *String : fmt.Stringer
Time is the number of milliseconds since the epoch (1970-01-01 00:00 UTC) excluding leap seconds. Add returns the Time t + d. After reports whether the Time t is after o. Before reports whether the Time t is before o. Equal reports whether two Times represent the same instant. MarshalJSON implements the json.Marshaler interface. String returns a string representation of the Time. Sub returns the Duration t - o. Time returns the time.Time representation of t. Unix returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC. UnixNano returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC. UnmarshalJSON implements the json.Unmarshaler interface. Time : github.com/goccy/go-json.Marshaler *Time : github.com/goccy/go-json.Unmarshaler Time : encoding/json.Marshaler *Time : encoding/json.Unmarshaler Time : expvar.Var Time : fmt.Stringer Time : golang.org/x/net/internal/timeseries.Clock func Now() Time func TimeFromUnix(t int64) Time func TimeFromUnixNano(t int64) Time func Time.Add(d time.Duration) Time func Time.After(o Time) bool func Time.Before(o Time) bool func Time.Equal(o Time) bool func Time.Sub(o Time) time.Duration const Earliest const Latest
ValidationScheme is a Go enum for determining how metric and label names will be validated by this library. const LegacyValidation var NameValidationScheme const UTF8Validation
Value is a generic interface for values resulting from a query evaluation. ( Value) String() string ( Value) Type() ValueType Matrix *Scalar *String Vector Value : expvar.Var Value : fmt.Stringer
MarshalJSON implements json.Marshaler. ( ValueType) String() string (*ValueType) UnmarshalJSON(b []byte) error ValueType : github.com/goccy/go-json.Marshaler *ValueType : github.com/goccy/go-json.Unmarshaler ValueType : encoding/json.Marshaler *ValueType : encoding/json.Unmarshaler ValueType : expvar.Var ValueType : fmt.Stringer func Matrix.Type() ValueType func (*Scalar).Type() ValueType func (*String).Type() ValueType func Value.Type() ValueType func Vector.Type() ValueType const ValMatrix const ValNone const ValScalar const ValString const ValVector
Vector is basically only an alias for Samples, but the contract is that in a Vector, all Samples have the same timestamp. Equal compares two sets of samples and returns true if they are equal. ( Vector) Len() int Less compares first the metrics, then the timestamp. ( Vector) String() string ( Vector) Swap(i, j int) ( Vector) Type() ValueType Vector : Value Vector : expvar.Var Vector : fmt.Stringer Vector : sort.Interface func github.com/prometheus/common/expfmt.ExtractSamples(o *expfmt.DecodeOptions, fams ...*dto.MetricFamily) (Vector, error) func Vector.Equal(o Vector) bool func github.com/prometheus/common/expfmt.(*SampleDecoder).Decode(s *Vector) error
Package-Level Functions (total 15)
EscapeMetricFamily escapes the given metric names and labels with the given escaping scheme. Returns a new object that uses the same pointers to fields when possible and creates new escaped versions so as not to mutate the input.
EscapeName escapes the incoming name according to the provided escaping scheme. Depending on the rules of escaping, this may cause no change in the string that is returned. (Especially NoEscaping, which by definition is a noop). This function does not do any validation of the name.
FingerprintFromString transforms a string representation into a Fingerprint.
IsValidLegacyMetricName is similar to IsValidMetricName but always uses the legacy validation scheme regardless of the value of NameValidationScheme. This function, however, does not use MetricNameRE for the check but a much faster hardcoded implementation.
IsValidMetricName returns true iff name matches the pattern of MetricNameRE for legacy names, and iff it's valid UTF-8 if the UTF8Validation scheme is selected.
LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a given label set. (Collisions are possible but unlikely if the number of label sets the function is applied to is small.)
Now returns the current time as a Time.
ParseDuration parses a string into a time.Duration, assuming that a year always has 365d, a week always has 7d, and a day always has 24h.
ParseFingerprint parses the input string into a fingerprint.
SignatureForLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and only includes the labels with the specified LabelNames into the signature calculation. The labels passed in will be sorted by this function.
SignatureWithoutLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and excludes the labels with any of the specified LabelNames from the signature calculation.
TimeFromUnix returns the Time equivalent to the Unix Time t provided in seconds.
TimeFromUnixNano returns the Time equivalent to the Unix Time t provided in nanoseconds.
UnescapeName unescapes the incoming name according to the provided escaping scheme if possible. Some schemes are partially or totally non-roundtripable. If any error is enountered, returns the original input.
Package-Level Variables (total 6)
LabelNameRE is a regular expression matching valid label names. Note that the IsValid method of LabelName performs the same check but faster than a match with this regular expression.
MetricNameRE is a regular expression matching valid metric names. Note that the IsValidMetricName function performs the same check but faster than a match with this regular expression.
NameEscapingScheme defines the default way that names will be escaped when presented to systems that do not support UTF-8 names. If the Content-Type "escaping" term is specified, that will override this value. NameEscapingScheme should not be set to the NoEscaping value. That string is used in content negotiation to indicate that a system supports UTF-8 and has that feature enabled.
NameValidationScheme determines the global default method of the name validation to be used by all calls to IsValidMetricName() and LabelName IsValid(). Deprecated: This variable should not be used and might be removed in the far future. If you wish to stick to the legacy name validation use `IsValidLegacyMetricName()` and `LabelName.IsValidLegacy()` methods instead. This variable is here as an escape hatch for emergency cases, given the recent change from `LegacyValidation` to `UTF8Validation`, e.g., to delay UTF-8 migrations in time or aid in debugging unforeseen results of the change. In such a case, a temporary assignment to `LegacyValidation` value in the `init()` function in your main.go or so, could be considered. Historically we opted for a global variable for feature gating different validation schemes in operations that were not otherwise easily adjustable (e.g. Labels yaml unmarshaling). That could have been a mistake, a separate Labels structure or package might have been a better choice. Given the change was made and many upgraded the common already, we live this as-is with this warning and learning for the future.
ZeroSample is the pseudo zero-value of Sample used to signal a non-existing sample. It is a Sample with timestamp Earliest, value 0.0, and metric nil. Note that the natural zero value of Sample has a timestamp of 0, which is possible to appear in a real Sample and thus not suitable to signal a non-existing Sample.
ZeroSamplePair is the pseudo zero-value of SamplePair used to signal a non-existing sample pair. It is a SamplePair with timestamp Earliest and value 0.0. Note that the natural zero value of SamplePair has a timestamp of 0, which is possible to appear in a real SamplePair and thus not suitable to signal a non-existing SamplePair.
Package-Level Constants (total 45)
AddressLabel is the name of the label that holds the address of a scrape target.
const AlertFiring AlertStatus = "firing"
AlertNameLabel is the name of the label containing the alert's name.
const AlertResolved AlertStatus = "resolved"
Possible values for Escaping Key:
BucketLabel is used for the label that defines the upper bound of a bucket of a histogram ("le" -> "less or equal").
DotsEscaping is similar to UnderscoreEscaping, except that dots are converted to `_dot_` and pre-existing underscores are converted to `__`.
Earliest is the earliest Time representable. Handy for initializing a high watermark.
const EscapeDots = "dots"
const EscapeUnderscores = "underscores"
const EscapeValues = "values"
EscapingKey is the key in an Accept or Content-Type header that defines how metric and label names that do not conform to the legacy character requirements should be escaped when being scraped by a legacy prometheus system. If a system does not explicitly pass an escaping parameter in the Accept header, the default NameEscapingScheme will be used.
ExportedLabelPrefix is the prefix to prepend to the label names present in exported metrics if a label of the same name is added by the server.
InstanceLabel is the label name used for the instance label.
JobLabel is the label name indicating the job from which a timeseries was scraped.
Latest is the latest Time representable. Handy for initializing a low watermark.
LegacyValidation is a setting that requires that all metric and label names conform to the original Prometheus character requirements described by MetricNameRE and LabelNameRE.
MetaLabelPrefix is a prefix for labels that provide meta information. Labels with this prefix are used for intermediate label processing and will not be attached to time series.
MetricNameLabel is the label name indicating the metric name of a timeseries.
MetricsPathLabel is the name of the label that holds the path on which to scrape a target.
const MetricTypeCounter MetricType = "counter"
const MetricTypeGauge MetricType = "gauge"
const MetricTypeGaugeHistogram MetricType = "gaugehistogram"
const MetricTypeHistogram MetricType = "histogram"
const MetricTypeInfo MetricType = "info"
const MetricTypeStateset MetricType = "stateset"
const MetricTypeSummary MetricType = "summary"
const MetricTypeUnknown MetricType = "unknown"
NoEscaping indicates that a name will not be escaped. Unescaped names that do not conform to the legacy validity check will use a new exposition format syntax that will be officially standardized in future versions.
ParamLabelPrefix is a prefix for labels that provide URL parameters used to scrape a target.
QuantileLabel is used for the label that defines the quantile in a summary.
ReservedLabelPrefix is a prefix which is not legal in user-supplied label names.
SchemeLabel is the name of the label that holds the scheme on which to scrape a target.
ScrapeIntervalLabel is the name of the label that holds the scrape interval used to scrape a target.
ScrapeTimeoutLabel is the name of the label that holds the scrape timeout used to scrape a target.
SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is used to separate label names, label values, and other strings from each other when calculating their combined hash value (aka signature aka fingerprint).
TmpLabelPrefix is a prefix for temporary labels as part of relabelling. Labels with this prefix are used for intermediate label processing and will not be attached to time series. This is reserved for use in Prometheus configuration files by users.
UnderscoreEscaping replaces all legacy-invalid characters with underscores.
UTF8Validation only requires that metric and label names be valid UTF-8 strings.
const ValMatrix ValueType = 3
const ValNone ValueType = 0
const ValScalar ValueType = 1
const ValString ValueType = 4
ValueEncodingEscaping prepends the name with `U__` and replaces all invalid characters with the unicode value, surrounded by underscores. Single underscores are replaced with double underscores.
const ValVector ValueType = 2