Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPromCompliantName ¶ added in v0.0.3
Build a Prometheus-compliant metric name for the specified metric
Metric name is prefixed with specified namespace and underscore (if any). Namespace is not cleaned up. Make sure specified namespace follows Prometheus naming convention.
See rules at https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels and https://prometheus.io/docs/practices/naming/#metric-and-label-naming
func CleanUpString ¶
Clean up specified string so it's Prometheus compliant
func NormalizeLabel ¶
Normalizes the specified label to follow Prometheus label names standard
See rules at https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
Labels that start with non-letter rune will be prefixed with "key_"
Exception is made for double-underscores which are allowed
func TrimPromSuffixes ¶
func TrimPromSuffixes(promName string, metricType pmetric.MetricType, unit string) string
TrimPromSuffixes trims type and unit prometheus suffixes from a metric name. Following the OpenTelemetry specs for converting Prometheus Metric points to OTLP.
Types ¶
This section is empty.